custom-hooks-commands

textPage 15 of 152
50 messages on this page
Thursday, June 27, 2024
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
Thanks !
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
Brilliant
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
Looks good
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
{{#if (eq this.entityId custom.entID)}}
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
But need to close the ( from eq
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
Oooh
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
Driving sorry. Dont need to have the custom inside the () at all in there
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
?
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
{{#if (eq this.entityId (custom.entID)}}
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
Like this
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
Yes but can't have {{}} inside {{}}, only ()
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
Logline hook
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
Is that somehow possible?
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
Note the custom var in if statement
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
{{#each server.onlinePlayers}}
{{#if (gte this.role.level -1)}}
{{#if (eq this.entityId {{custom.entID}})}}
say {{custom.entID}}
{{/if}}
{{/if}}
{{/each}}
Wednesday, June 19, 2024
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
you can code both if you want, for unstuck, teleport the player to its exact same location, but with -1 y coord
Avatar for b5a4a2b065a2a30dbcd94eaff9bff52ccc45b431c684ef69a8607d2b26b4da3a
User b5a4a2
And since im here, any suggestions for a player being stuck ? a suicide command or unstuck ? (can only find vehicle unstuck commands) ๐Ÿ™‚
Avatar for b5a4a2b065a2a30dbcd94eaff9bff52ccc45b431c684ef69a8607d2b26b4da3a
User b5a4a2
thx
Avatar for b5a4a2b065a2a30dbcd94eaff9bff52ccc45b431c684ef69a8607d2b26b4da3a
User b5a4a2
ah thats not a bad idea either, will try to make a hook ๐Ÿ™‚
Avatar for 602ca815dc7501e6a962147ab179d09dca96d576877ccc458c8656c35bc7361b
User 602ca8
Well you can always inform players of your restart times by using a hook when player connects. Thats the simple way. If you want the exact remaining time that it requires a more complicated code
Avatar for b5a4a2b065a2a30dbcd94eaff9bff52ccc45b431c684ef69a8607d2b26b4da3a
User b5a4a2
Will set this up.
I just found the benefit in being able to have a command for it in case i join the server and want to go to the quest right away, instead of hoping for a "well timed" message.
I remember i set this up in the past but trough something else then csmm, so i thought if there is a way to create a custom cmd.
thx for answering tho
Avatar for 602ca815dc7501e6a962147ab179d09dca96d576877ccc458c8656c35bc7361b
User 602ca8
I announce them 1 hour before
Avatar for 602ca815dc7501e6a962147ab179d09dca96d576877ccc458c8656c35bc7361b
User 602ca8
Say "Server will restart in 30 minutes"
Avatar for b5a4a2b065a2a30dbcd94eaff9bff52ccc45b431c684ef69a8607d2b26b4da3a
User b5a4a2
okay ๐Ÿ™‚ that could do aswell
Avatar for b5a4a2b065a2a30dbcd94eaff9bff52ccc45b431c684ef69a8607d2b26b4da3a
User b5a4a2
yep i got that configured, but if im doing a long quest that might take 30 min or so it might be nice to check how much time i got before restart
Avatar for 602ca815dc7501e6a962147ab179d09dca96d576877ccc458c8656c35bc7361b
User 602ca8
Make a cron job with a message command announcing next restart
Avatar for 602ca815dc7501e6a962147ab179d09dca96d576877ccc458c8656c35bc7361b
User 602ca8
For example this will send a message every minute and the server will restart after 10 minutes
Avatar for b5a4a2b065a2a30dbcd94eaff9bff52ccc45b431c684ef69a8607d2b26b4da3a
User b5a4a2
that would just announce a 10 minute mark before restart right ? but is there a way to make e.g. /shutdown say :"server restart in 1,5 hour"
Avatar for 602ca815dc7501e6a962147ab179d09dca96d576877ccc458c8656c35bc7361b
User 602ca8
Use shutdownba 10
Avatar for b5a4a2b065a2a30dbcd94eaff9bff52ccc45b431c684ef69a8607d2b26b4da3a
User b5a4a2
would it be possible to set up a custom command to show the time remaining until server restart?
I find this handy before starting a lengthy quest as it sucks if the restart happens during a quest.
Wednesday, June 12, 2024
Avatar for 0cec7b679cffd6141a393072bf27c9e50c091382dcfa3773b1564d2dec5d200e
User 0cec7b
done and done ๐Ÿ™‚ thanks dude
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
remember to set max global teleports to at least the same max as the one the role with the most teleports have
Avatar for 0cec7b679cffd6141a393072bf27c9e50c091382dcfa3773b1564d2dec5d200e
User 0cec7b
yeah figured that haha and ive now put a custom reply to it too ๐Ÿ™‚
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
you just need to enable teleports then, I think it is in the ingame commands section
Avatar for 0cec7b679cffd6141a393072bf27c9e50c091382dcfa3773b1564d2dec5d200e
User 0cec7b
yes it does lol
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
The built in teleport system grants the player the possibility of setting X teleports, depending on what you set for the role. Teleports can have a cost to use and, in that case, the not enough funds message is also built in. Do you think that fulfills your needs?
Avatar for 0cec7b679cffd6141a393072bf27c9e50c091382dcfa3773b1564d2dec5d200e
User 0cec7b
like they type $tele newlocation and csmm checks their balance in CSMM and if there is enough the teleport is granted.
if not CSMM will reply back with not enough balance
is this something that can be done
Avatar for 0cec7b679cffd6141a393072bf27c9e50c091382dcfa3773b1564d2dec5d200e
User 0cec7b
hey guys have a question .. (who'd a thought lol)
so.. looking at giving players a teleport but they have to have our currency to buy say 50 to gain a teleport but if they don't have enough csmm to say you don't have enough or something.
Saturday, June 8, 2024
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
btw, that is using the player current position as a starter point, you can make it absolute coords too, just keep messing with index and notice the first one is 0, so times 5 goes from 0 to 4
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
{{#times 5}}
teleportplayer {{player.entityId}} {{add (multiply (add index 1) 140) player.positionX}} -1 {{player.positionZ}};
wait(3);
{{/times}}
Make it a custom ingame command with "Role level needed for execution" limited to yourself ๐Ÿ˜‰
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
I can't even be sure I follow the logic there...
Avatar for 5791fcfcef7b2841fa029a4a736164d279a277be56bff02124771f514a648413
User 5791fc
Well, this is working. But, I suspect this is not the best way to do it. Because, I am barely initiated into the handlebar rabbit-hole and it is blowing my mind RN.
first_version.png

first_version.png

PNG โ€ข 14.9 KB

Thursday, June 6, 2024
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
{{#times 5}}
1
{{/times}}
Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
No content
image.png

image.png

PNG โ€ข 6.9 KB

Avatar for 6ceaf41ff27d04ff247f59c1bc5a9f4cc4ace95acc526862d52cdbbb8702989b
User 6ceaf4
@User 72854460 { times } is obscure, not many use it ๐Ÿ™‚
Avatar for 83e76db10dc836cea2eaf6f49d3b7c63f7f583480678c2307e6fe16a317b2957
User 83e76d
tT
Avatar for 7fd701b1a0deec6e66cf33cfedaeec60a9fbce2f681804879bd80bdbfc0e3ec0
User 7fd701
and you search for the player's name on log line
Avatar for 7fd701b1a0deec6e66cf33cfedaeec60a9fbce2f681804879bd80bdbfc0e3ec0
User 7fd701
just
spawnscouts ${player.entityId}
Wednesday, June 5, 2024
Avatar for 9035b67b57d44e49c04446515aa009f075099148629fce6b992405d1f5dafeb9
User 9035b6
I was able to get it running. The only real issue is the screamer spawns in there general area and not right at them. Is there a way to make it spawn closer?
Avatar for 7fd701b1a0deec6e66cf33cfedaeec60a9fbce2f681804879bd80bdbfc0e3ec0
User 7fd701
event
playerLevel