Discord Thread possible to disable player movement which is not on ground without server kicking player ?

  • 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 comminuty!

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

This thread came from the skUnity Discord. You can't reply to it here but if you join the skUnity Discord, you'll be able to post a reply there. The thread link is part of the thread's message.
Status
Not open for further replies.
code_language.skript:
command /sitdown [<text>]:
    trigger:
        if arg 1 is set:
            loop all players:
                if arg 1 is "true":
                    set {_} to 1
                    while air is {_} of block below location of loop-player:
                        add 1 to {_}
                    set {_pos} to {_} of block below location of loop-player
                    teleport loop-player to {_pos}
                    set {no-move::%loop-player%} to true
                if arg 1 is "false":
                    delete {no-move::%loop-player%}
on player move:
    cancel event if {no-move::%player%} is set
I'm not sure if that's what it is, but it should work
/sit down true - can't move
/sit down false - can move

Posted by: _grifin_ from the skUnity Discord.
 
Status
Not open for further replies.