Getting The Player With The Highest Kills?
#1

My friend asked me if i could help him finish his script but i cant figure out what the problem with it is. I have got this http://pastebin.com/m44cbdb97 so far but it is only return id 0 as shown here > i have a timer that uses the function every minute and bots to test this on but it is only returning id 0
Reply
#2

Код:
stock GetWinner()
{
	new bestkills = 0;
	new id = INVALID_PLAYER_ID;
	for(new i = 0; i < GetMaxPlayers(); i++)
	{
		if(Kills[i] > bestkills) {
			bestkills = Kills[i];
			id = i;
		}
	}
	return id;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)