custom-hooks-commands
textPage 2 of 152
50 messages on this page
Friday, January 31, 2025
User 28c666
Hello! How can I set the restart to trigger before the horde? My problem is that the “horde is arriving tonight” is 8 minutes before the horde, and there is not enough time! We would like to have a restart about 20-30 minutes before the horde! Thanks in advance!
User a827fb
Heading to bed now. Will check back in the morning. Thanks!
User a827fb
OK, so the following works if it's in a custom command but not in a playerConnected custom hook. It also works if I wrap it in an {{each}}. That suggests that it doesn't have a player object. Funny thing is though, even having just the first sendDiscord line doesn't work in a playerConnected. Mad restarted the AU instance which fixed our double-processing of commands so that side should be OK.
Can anyone point out where I'm going astray? I have tried changing player.role.level to this.role.level and I've tried wrapping it in ${} but neither has helped.
{{#if (lte player.role.level 1)}} sendDiscord(123456REDACTED123456, "* VIP ${player.name} is an Admin."); {{else if (eq player.role.level 100)}} sendDiscord(123456REDACTED123456, "* VIP ${player.name} is a Diamond supporter."); ... {{else if (eq player.role.level 1000)}} sendDiscord(123456REDACTED123456, "* VIP ${player.name} is a scrub."); {{else}} sendDiscord(123456REDACTED123456, "* There's nobody here!"); {{/if}}```
User a827fb
Do playerConnected hooks not run for admins? Is there something incorrect with this?

image.png
PNG • 2.3 KB
User a827fb
hmm. Even the first line by itself isn't working.
User a827fb
Can anyone say why the following isn't working?
w2l "Here we go!";
{{#each server.onlinePlayers}}
w2l "VIP ${player.name} is here.");
{{/each}}
w2l "Here we go!";
{{#each server.onlinePlayers}}
w2l "VIP ${player.name} is here.");
{{/each}}
Monday, January 20, 2025
User 2fc02a
You'd need to add the wpc function to each of your commands and use /return as the command then. I only allow /return from /home.
There's no easy shortcut.
There's no easy shortcut.
User a12f6e
That's not what I'm asking though. CSMM has a built in chat command called
/rt. However it doesn't seem to recognize the CPM mv command as a teleport. So I'm wondering if there's a way to set the return point for /rt to use via a script.I know I can make a separate /return command, but I'd rather not tell my players that they sometimes have to use /rt and other times have to use /return. 🙂
User 2fc02a
or search return in the docs
User 2fc02a
User a12f6e
is there any way to make a custom command or hook that sets the return destination for CSMM's
/rt chat command? i find that when using CPM's mv command that /rt doesn't find a return position and would like to fix that for the custom commands i have that use mv.Sunday, December 29, 2024
User 2fc02a
Use an argument.
So, what you should do is capture the log line by setting it low. Go to Bing and input what you want for regex and you'll get the variable you want
So, what you should do is capture the log line by setting it low. Go to Bing and input what you want for regex and you'll get the variable you want
Saturday, December 28, 2024
User 7be995
I was wondering if there are any places where one might find essentially a collection of example hooks/commands beyond what is found on docs.csmm.app? Having fun being creative on my own, but never hurts to have more reference material to learn from 😄
Friday, December 27, 2024
User 963f55
what is your overall goal? and we can try and help with direction...
User 553895
Does anyone know how I can automate Cpm Donor Slots.xml custom hooks?
Thursday, December 26, 2024
User c4c515
Thank you very much, I will test it
User 602ca8
you can also add 'for day'
User c4c515
BloodMoon starting
User 602ca8
of course the "126" should not be added since that will change
User 602ca8
BloodMoon starting for day 126Blood moon is over!User c4c515
"logline"
User c4c515
Can someone give me the beginning and end of the blood moon log line?
Monday, December 23, 2024
User 602ca8
I honestly wasn't planning it, cpm kept throwing a null error when blood moon starts and I couldn't find out what was triggering it, so I ended up having no option but to do my own.
User 6ceaf4
Booo, we were doing some crazy stuff man 🙂
User 602ca8
Nope, I created my own mod with C#
User 6ceaf4
Full Takaro?
Saturday, December 21, 2024
User c4c515
Thanks
User 602ca8
Well you could create a hook to the line when a player gets banned. Unfortunately I don't use csmm anymore so I cannot make it for you
User 602ca8
Hooks use log lines so unless they changed they should work
User c66f41
Some of my hooks are not firing despite working properly
User c66f41
Hi, are there any changes neccesary for my hooks if I update to 1.2 and subsequently the new CSMM and CPM?
User c4c515
Hello, can I create a "say" message with ban for everyone to see the banned user?
Monday, December 16, 2024
User 6ceaf4
I think it is player.role.level
User 553895
It shouldn't be the level in the game, but the permissions on roles.
Only those with a donation role in CSMM get the extra reward.
Only those with a donation role in CSMM get the extra reward.
Sunday, December 15, 2024
User a506fe
Object being player level
User a506fe
And =700 should be
eq object 700
eq object 700
User a506fe
{{#if (gte player.level 100)}}
pm {{player.steamId}} "That worked"
{{else}}
pm {{player.steamId}} "Sorry, you must be at least level 100 for this command"
{{/if}}
pm {{player.steamId}} "That worked"
{{else}}
pm {{player.steamId}} "Sorry, you must be at least level 100 for this command"
{{/if}}
User a506fe
From the docs for if statement
User a506fe
Your handlebar code is not correct
User 553895
Good morning,
Can someone tell me what is wrong with the vote command?
The players who have role 700 should get the additional reward, but all players get the reward.
Can someone tell me what is wrong with the vote command?
The players who have role 700 should get the additional reward, but all players get the reward.
say "${player.name} [FF00FF]Danke für dein Vote"; addCurrency(${player.id}, 1000); giveplus ${entityId} ammo9mmBulletBall 300; if (player.role.level = 700) { addCurrency(${player.id}, 5000); giveplus ${entityId} questRewardT1SkillMagazineBundle 1; say "${player.name} [00FF00]Du hast zusätzliche Belohnungen erhalten!"; }
Wednesday, December 11, 2024
User f7ec30
I see. I will look at it closer thank you. And thank you for csmm, it is a brilliant program. 😉
User bddf69
For the double command, well when a new player joins they are also creating a new 'connected' event, that is probably why you see the 'doubling'?
User bddf69
Also is there a way to delay the greeting?
You can use
wait to delay the message by a few secondsUser f7ec30
🧐
User f7ec30
I am very sorry if this is a newb question, but I have the bot setup so that when a current player connects it greets them once, and when a NEW player connects it gives a welcome message. So why does my bot greet only new players twice, please help its annoying. Also is there a way to delay the greeting?
Saturday, December 7, 2024
User c66f41
That’s what I was looking for. Nice to know I was in the right track
User a506fe
then use it at will
User a506fe
use regex to catch any part of the logline into a var
User a506fe
yeps
