Returning largest number
#1

Hello,

I am making a DM/Paintball script. When the rounds end, the script has to choose the winner by itself. The winner is the one with the highest score (duh). But now, how do i make a function that will return the largest inserted number? So ...

Код:
public OnRoundEnd(areaid)
{
	if(ReturnAreaPlayers(areaid) < 2) return SendClientMessageToArea(areaid, COLOR_RED, "The match has been ended. There not enough players to select a winner.");
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(inPBarea[i] == 1 && PBareaid[i] == areaid)
		{
                                 //here that function that will return the biggest PBscore[i]
                                 //if succes here my winner-code
Thanks
Greetz,
Danny
Reply


Messages In This Thread
Returning largest number - by Danny - 10.02.2011, 18:17
Re: Returning largest number - by Ash. - 10.02.2011, 18:19
Re: Returning largest number - by Kwarde - 10.02.2011, 18:21

Forum Jump:


Users browsing this thread: 2 Guest(s)