SA-MP Forums Archive
DM help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: DM help (/showthread.php?tid=154210)



DM help - iStarzz - 12.06.2010

I am about to make a DM script, But how to make it when the time is up that it picks the player with the highest amount of kills?


Re: DM help - Backwardsman97 - 12.06.2010

pawn Код:
new highestid = INVALID_PLAYER_ID;
for(new i; i<MAX_PLAYERS; i++)
{
   if(GetPlayerScore(i) > GetPlayerScore(highestid))//GetPlayerScore or some variable to represent kills
     highestid = i;
}



Re: DM help - iStarzz - 12.06.2010

Thanks, this helps me