10.02.2011, 18:17
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 ...
Thanks
Greetz,
Danny
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
Greetz,
Danny

