Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-02-2010, 10:32 PM
ZeroG ZeroG is offline
Developer
Join Date: Oct 2010
Posts: 12
ZeroG is on a distinguished road
Exclamation Everyone with client.var....

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.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.