custom-hooks-commands
textPage 7 of 152
50 messages on this page
Sunday, October 13, 2024
User 23fa64
Is that the same for both?
User 0c9f0f
{{#each server.onlinePlayers}} {{#if (lte this.role.level 0)}} cgc adduser {{this.entityId}} Admin; admin add {{this.entityId}} 0; {{else if (lte this.role.level 10)}} cgc adduser {{this.entityId}} Moderator; admin add {{this.entityId}} 10; {{else if (lte this.role.level 20)}} cgc adduser {{this.entityId}} facilitator; admin add {{this.entityId}} 20; {{else if (lte this.role.level 800)}} cgc adduser {{this.entityId}} Supporter; admin add {{this.entityId}} 800; {{else}} cgc adduser {{this.entityId}} Player; admin add {{this.entityId}}; {{/if}} {{/each}}
User 23fa64
Can you post the script again?
User 0c9f0f
so groups are set i can manually add people the script doesnt want to work though

image.png
PNG • 37.5 KB
Saturday, October 12, 2024
User 6ceaf4
iirc, a gametime credit set for 1 hour does not exactly reward players every hour, but instead, everyone online when the new hour comes. Might wanna test that and do a cronjob that fires a minute later, perhaps.
But if in the meantime they kill a zombie, it will be awkward....
And if you make it every minute, 100% spammy
But if in the meantime they kill a zombie, it will be awkward....
And if you make it every minute, 100% spammy
User 6ceaf4
player.role.level is what you need
User 553895
You would have to enter that in the custom hooks. In Player Connect.
Then every player who comes onto the server will be asked for their role.
Then every player who comes onto the server will be asked for their role.
User 0d4a24
And while I'm thinking about it, is there any way to integrate roles into hooks, so for example if I wanted to give a player an item for killing a particular zombie, could that item be role specific, so say a normal player kills a Boss Grace, they get a quality 2 pump action shotgun and 100 shells, but if a Donor kills it they get a level 4 pump action shotgun and 200 shells?
User 0d4a24
I'm a complete noob at this stuff, I've worked out a custom hook for displaying the player's balance on killing a zombie with the event ZombieKilled and the command pm ${player.entityId} "Your new ChonkyKredz balance is: [ff77ee]${player.currency}" and while it's a little clunky it'll be ok.
Is there any way of displaying when the gametime credit is applied please?
Is there any way of displaying when the gametime credit is applied please?
Thursday, October 10, 2024
User 6ceaf4
Pcc bliss ffffff 0
User 0c9f0f
oh ok how do i do that
User 6ceaf4
Does not look like you cleared the pcc thing
User 0c9f0f
the text didnt change after i deleted the hook
User 0c9f0f
i did b4 but ive deleted it since
User 6ceaf4
No?
User 6ceaf4
Pcc i mean
User 6ceaf4
Seems like you might have a playerchatcolor aka occ too
User 0c9f0f
yes
User 6ceaf4
Aint ffffff white?
User 0c9f0f
i changed it via hook, player login but i deleted it and reloged since
User 6ceaf4
Cgc listgroups says what?
User 0c9f0f
ok not sure whats going on now i typed in cgc adduser Bliss Admin added my self did the addgroup command and my text didnt change
User 0c9f0f
{{#each server.onlinePlayers}} {{#if (lte this.role.level 0)}} cgc adduser {{this.entityId}} Admin; admin add {{this.entityId}} 0; {{else if (lte this.role.level 10)}} cgc adduser {{this.entityId}} Moderator; admin add {{this.entityId}} 10; {{else if (lte this.role.level 20)}} cgc adduser {{this.entityId}} facilitator; admin add {{this.entityId}} 20; {{else if (lte this.role.level 800)}} cgc adduser {{this.entityId}} Supporter; admin add {{this.entityId}} 800; {{else}} cgc adduser {{this.entityId}} Player; admin remove {{this.entityId}}; {{/if}} {{/each}}
User 6ceaf4
It looks like you created the group Admin and now tried to add yourself to the group admins... that wont work
User 0c9f0f
ok so i ran the command but my text is still the same i think this is right
not sure what to do next
not sure what to do next

image.png
PNG • 26.1 KB
User 6ceaf4
Addgroup is a command you run just once to create the group
User 0c9f0f
this is alil confusing i tried it doesnt seem to work though

image.png
PNG • 5.5 KB
Wednesday, October 9, 2024
User 23fa64
You setup the chat groups.
User 0c9f0f
so now that roles are set how to i set color to each role?
User 23fa64
Just set the Discord roles in Permissions and roles.
User 23fa64
The magic with this your players can sign into CSMM, link their Discord and this can do it's own thing.
User 23fa64
This would be a server automation, set it to run every 20 or 30 minutes.
User 0c9f0f
then i do what to call up the variables ${moderators}?
User 0c9f0f
ok i think i understan alittle this is saying "lte this.role.level 800" if the user is that level they are added as this rank
so to use this i just pop it into player connects?
User 0c9f0f
{{#each server.onlinePlayers}}
{{#if (lte this.role.level 0)}} cgc adduser {{this.entityId}} admins;
admin add {{this.entityId}} 0;
{{else if (lte this.role.level 10)}} cgc adduser {{this.entityId}} moderators;
admin add {{this.entityId}} 10;
{{else if (lte this.role.level 20)}} cgc adduser {{this.entityId}} facilitator;
admin add {{this.entityId}} 20;
{{else if (lte this.role.level 800)}} cgc adduser {{this.entityId}} supporters;
admin add {{this.entityId}} 800;
{{else}} cgc adduser {{this.entityId}} players;
admin remove {{this.entityId}};
{{/if}}
{{/each}}
{{#if (lte this.role.level 0)}} cgc adduser {{this.entityId}} admins;
admin add {{this.entityId}} 0;
{{else if (lte this.role.level 10)}} cgc adduser {{this.entityId}} moderators;
admin add {{this.entityId}} 10;
{{else if (lte this.role.level 20)}} cgc adduser {{this.entityId}} facilitator;
admin add {{this.entityId}} 20;
{{else if (lte this.role.level 800)}} cgc adduser {{this.entityId}} supporters;
admin add {{this.entityId}} 800;
{{else}} cgc adduser {{this.entityId}} players;
admin remove {{this.entityId}};
{{/if}}
{{/each}}
ok so this is really complex to me does this add them as the role level?
Friday, October 4, 2024
User f7ec30
Awesome, I am trying to do something similar, don't help me though I am trying to learn.
User 2fc02a
My vote is built into my esc menu and it opens a webpage
User f7ec30
Perfect, thank you. I am just wondering if I should even attempt it. Thanks a lot for answering my noob questions. I have learned a lot so far.
User 6ceaf4
if there is a console command that opens steam browser (I never heard of one) yes. Otherwise, no.
Thursday, October 3, 2024
User f7ec30
Is there a way to open a client's steam browser, to a certain website using a custom hook? For example if I wanted it to pop up with the vote website. I am sure there must be a way, because there is a steam browser command. I am afraid I am just too noob to handle this one boys. Again, just a yes or no answer is fine you don't need to elaborate.
Sunday, September 29, 2024
User d6c4fe
thank you i sorted it i didnt reinstall the aloc server mods and web tokens had vanished thanks for your help
Saturday, September 28, 2024
User 6edfda
Once I used yours it worked fine, thanks dude!
User 6edfda
Works, apparently theres some sort of discrepency between entity ids, the ids with the spawnentity help command in the console don’t entirely match up
User 6edfda
Alright mate, I'll give it a go 🙂
User 6ceaf4
you want 128 instead of sc_General
User 6edfda
Do the zombos spawn for you too? Then the loot crates?



