I'm new to skript and i want to make a freeze skript, this is what ive come up with:
Freezing other players work but not myself, i want to make it that if argument 1 (player) is not set it will freeze the person running the command, how?
SCSS:
command /freeze <player>:
permission: op
permission message: You &4&ldon't &rhave the permissions to use this!
trigger:
if arg-1 is not set:
set player's walk speed to 0
set player's fly speed to 0
play sound "block.note_block.pling" at volume 1 at pitch 2 to player
message "&3&lYou have been &f&lfrozen!"
else:
set arg-1's walk speed to 0
set arg-1's fly speed to 0
message "&3&l%arg-1% has been &f&lfrozen!"
play sound "block.note_block.pling" at volume 1 at pitch 2 to arg-1
send title "&3&lYou have been &c&lfrozen!" to arg-1 for 3 seconds
command /unfreeze <player>:
permission: op
permission message: You &4&ldon't &rhave the permissions to use this!
trigger:
if arg-1 is not set:
set player's walk speed to 1 *0.2
set player's fly speed to 1 * 0.1
play sound "block.note_block.pling" at volume 1 at pitch 2 to player
send title "&3&lYou have been &c&lunfrozen!" to arg-1 for 3 seconds
else:
set arg-1's walk speed to 1 * 0.2
set arg-1's fly speed to 1 * 0.1
message "&3&l%arg-1% has been &c&lunfrozen!"
play sound "block.note_block.pling" at volume 1 at pitch 2 to player
send title "&3&lYou have been &c&lunfrozen!" to arg-1 for 3 seconds
Freezing other players work but not myself, i want to make it that if argument 1 (player) is not set it will freeze the person running the command, how?