freeze command

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

AdenR84

Active Member
Sep 4, 2023
112
1
18
so i have this:
command /freeze <player>:
permission: essential.freeze
permission message: &cYou Need Permission To Run That Command!
trigger:
on any move:
cancel event
it works amazing accept any time i walk frozen or not it doesnt work @BaeFell you could get to 1000 messages here!
 
so i have this:
command /freeze <player>:
permission: essential.freeze
permission message: &cYou Need Permission To Run That Command!
trigger:
on any move:
cancel event
it works amazing accept any time i walk frozen or not it doesnt work @BaeFell you could get to 1000 messages here!
Not sure if this will work, but try this:

Code:
command freeze [<player>]:
   permission: essential.freeze
   permission message: &cYou Need Permission To Run That Command!
    trigger:
        set {loc.%arg-1's uuid%} to location of arg-1

command unfreeze [<player>]:
   permission: essential.unfreeze
   permission message: &cYou Need Permission To Run That Command!
   trigger:
      clear {loc.%arg-1's uuid%}

on any move:
    loop all players:
        if {loc.%loop-player's uuid%} is set:
            teleport loop-player to {loc.%loop-player's uuid%}
It may not work, but what it does is set the player's location as a variable then when the player moves, it will teleport them to the saved location they were last at, thus freezing them. This has not been tested in game and I also added an unfreeze command as there was no way to undo /freeze.
 
ok can you test it rq
I had it parsed and it does not return any errors. However, parsing isn't perfect so there could be an issue when it's run in game (This would be like a logic error, for example if the teleporting part function unexpectedly). It's likely that it works without any issues in game and I would test it in game if I were able to.