Cancel Event for player in regions

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

  • LOOKING FOR A VERSION OF SKRIPT?

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

Status
Not open for further replies.

Yoshep

New Member
Jul 4, 2019
1
0
0
27
Code:
on place:
    if "%region at player%" contains "parkour":
        if player is not OP:
            execute console command "spawn %player%"
            execute console command "kick %player% Kicked"
            cancel event
            stop

This is not an error but does not work for ordinary players, but when I try to add the permissions '*' from pex it works and the player that I add the permissions '*' from pex is not op.
 
If I understand correctly, the instructions must be executed if the player is not an operator and does not have the *. If so, try this:
Code:
on place:
    if "%region at player%" contains "parkour":
        set {_Check} to 0
        if player is not OP:
          add 1 to {_Check}
        if player doesn't have permission "*":
          add 1 to {_Check}
        if {_Check} > 0:
            execute console command "spawn %player%"
            execute console command "kick %player% Kicked"
            cancel event
            stop
 
Status
Not open for further replies.