How to do for...?
#1

I have tried so many things that I do not still had other one that to ask for help...


I need to know how to do in order that a function returns her ID of the player with more points.

I did this:



pawn Код:
stock SearchPlayerWhitHighPoints()
{
    new Value = -1;
    new player = -1;
    new Float:Var;
   
    foreach(new i: Player)
    {
        Var = PlayerInfo[i][RadarSpeed]; // The points it would be 'PlayerInfo[i][RadarSpeed]'.
        if(Var > Value)
        {
            player = i;
        }
    }
    return player;
}

And it does not work, is more, I do not even see the logic to this function .
Might someone say to me how to do it?


Regards.
Reply


Messages In This Thread
How to do for...? - by Swedky - 31.01.2014, 16:30
Re: How to do for...? - by Misiur - 31.01.2014, 16:33
Respuesta: Re: How to do for...? - by Swedky - 31.01.2014, 16:41
Re: How to do for...? - by Misiur - 31.01.2014, 16:47
Re: How to do for...? - by Mic_H - 31.01.2014, 17:09
Respuesta: How to do for...? - by Swedky - 31.01.2014, 17:25

Forum Jump:


Users browsing this thread: 2 Guest(s)