Top list stats [ REP + ]
#2

pawn Код:
new toptime = 0;//creating a variable with 0 value
new topid = -1;//creating a variable with -1 value (as playerid can be 0 too so we are using -1)

for(new i=0; i < MAX_PLAYERS; i++)
{
    if(toptime < YourTimeStoringVariable[i])
    {
        toptime = YourTimeStoringVariable[i];
        topid = i;
    }
}
//the topid is the playerid with most time played (check if topid is not -1)
Here, untested.
Reply


Messages In This Thread
Top list stats [ REP + ] - by _GHT_MarK445 - 12.03.2015, 08:48
Re: Top list stats [ REP + ] - by De4dpOol - 12.03.2015, 09:00
Re: Top list stats [ REP + ] - by _GHT_MarK445 - 12.03.2015, 09:19
AW: Top list stats [ REP + ] - by Kaliber - 12.03.2015, 09:35
Re: Top list stats [ REP + ] - by De4dpOol - 12.03.2015, 09:35
AW: Re: Top list stats [ REP + ] - by Kaliber - 12.03.2015, 09:37
Re: Top list stats [ REP + ] - by _GHT_MarK445 - 12.03.2015, 09:52
Re: Top list stats [ REP + ] - by Vince - 12.03.2015, 10:05
AW: Re: Top list stats [ REP + ] - by Kaliber - 12.03.2015, 10:09
Re: Top list stats [ REP + ] - by _GHT_MarK445 - 12.03.2015, 10:25

Forum Jump:


Users browsing this thread: 1 Guest(s)