I'm trying to make a script that kicks everyone in a level who has a client.chance variable of 2, for example. I'm not sure how to make it so that whoever says /kick 2, everyone with client.chance=2 gets kicked. Right now it only kicks you if yourself. What I mean is, it only kicks you, no one else. How can I make it kick everyone what has client.chance=2?
Here is the script:
PHP Code:
if (created) {
setshape 1,128,128
}
if (playertouchsme){
player.client.chance=2;
}
function onPlayerChats(){
if (player.chat=="/kick 2"){
if (player.client.chance==2){
setlevel2 chance.nw,25,45;
}}
}
Oh, and I have another script that makes it so that everyone who enters the level gets the client.chance variable, so that isn't the problem.