View Single Post
  #3  
Old 10-02-2010, 10:36 PM
MrDumbledore MrDumbledore is offline
Headmaster of Hogwarts
MrDumbledore's Avatar
Join Date: Oct 2010
Location: The Leaky Cauldron
Posts: 31
MrDumbledore is on a distinguished road
You need to loop through each player.

PHP Code:
function onPlayerChats() { // player chats in the level
  
if (player.guild == "Events Team") {
    if (
player.chat.starts("/kick")) { // chat starts with /kick
      
temp.num player.chat.substring(6).trim(); // find the number the ET said
      
      
for (temp.pl players) { // loop through each player
        
if (pl.client.chance == num) { // it's the number the ET called
          
pl.setLevel2("chance.nw"2545); // warp that player (note "pl."setLevel2)
        
}
      }
    }
  }

You should also consider using clientr variables, or even player. variables serverside (this is preferable for something like this).

Keep in mind you should only use the above script in the level once.
__________________
It is our choices, Harry, that show what we truly are, far more than our abilities.
Reply With Quote