Sup, i need cooldown on my skript, but idk how to do that.
My original skript is this:
`on chat:
loop all players:
if message matches loop-player's name:
wait 1 tick
play sound "ENTITYEXPERIENCEORB_PICKUP" to loop-player
send action bar "&aSomeone pinged you :O" to loop-player`
And i need to do that players can ping for example after 5 seconds and i created something like this, but its not working as i want to ?
`on chat:
loop all players:
set {mention.%player%.cooldown} to 5 seconds
if message matches loop-player's name:
if {mention.%player%.cooldown} is not set:
wait 1 tick
play sound "ENTITYEXPERIENCEORB_PICKUP" to loop-player
send action bar "&aSomeone pinged you :O" to loop-player
else:
send "&cYou cant ping that fast!"
cancel event`
Posted by: danrub from the skUnity Discord. View the thread on skUnity Discord here
My original skript is this:
`on chat:
loop all players:
if message matches loop-player's name:
wait 1 tick
play sound "ENTITYEXPERIENCEORB_PICKUP" to loop-player
send action bar "&aSomeone pinged you :O" to loop-player`
And i need to do that players can ping for example after 5 seconds and i created something like this, but its not working as i want to ?
`on chat:
loop all players:
set {mention.%player%.cooldown} to 5 seconds
if message matches loop-player's name:
if {mention.%player%.cooldown} is not set:
wait 1 tick
play sound "ENTITYEXPERIENCEORB_PICKUP" to loop-player
send action bar "&aSomeone pinged you :O" to loop-player
else:
send "&cYou cant ping that fast!"
cancel event`
Posted by: danrub from the skUnity Discord. View the thread on skUnity Discord here