Jump to content

How to only have players in world be kicked by owner


whenyouknowitbelik

Recommended Posts

Hi,

I currently have a skript in which a user that owns their own world (created with their username as the world name), is able to kick other players. The only problem is that they are also able to kick players from other worlds, not just their own. Is there any way to fix this?

My skript:

Quote

command /kick [<player>]:
    trigger:
        if player's world is "%player%":
            teleport arg 1 to the spawn of world "(Spawn_World)"
            send message "&aKick successful." 
        else:
            send "&cYou can only do this command while in your world"

 

Link to comment
Share on other sites

Use %arg-1% to specify that you are utilizing the player in the command string. With this, you can check which world the player being kicked is in.

––––––––––––––––––––––––––––––––––––––––––––––––––

Please leave a reaction if my assistance was satisfactory!

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...