View Single Post
  #1  
Old 02-03-2011, 02:37 AM
Starfire2001 Starfire2001 is offline
Unholy Nation
Starfire2001's Avatar
Join Date: Dec 2010
Location: The streets.
Posts: 156
Starfire2001 will become famous soon enough
Event Player Counter

I'm attempting to make a player counter for an events I'm making. It works fine up till the end, in which I want to display the winning players name. Instead of doing that it seems to be just picking a person at random from the server and saying they win. Anyways, I'm pretty much completely new to scripting, started like 5 days ago, and I can't figure out what the problem could be. Any and all help would be appreciated.

PHP Code:
function onPlayerDies(pl){
  
temp.cot = -1;
  for (
temp.pl players) {
    if (
temp.pl.level.name == player.level.name){
      if (
pl.guild == "Events Team") {
        continue;
      }
      
cot ++;
    }
  }
  if (
cot == 1){
    
this.start 0;
    
setTimer(1);
  }
  else {
    
message(cot SPC "players left!");
  }
}
function 
onTimeout(){
  for (
temp.plallplayers)  {
    if (
temp.pl.level.name == player.level.name){
      if (
pl.guild == "Events Team") {
        continue;
      }
      
message(temp.pl.communityname SPC "wins!");
    }
  }

Reply With Quote