SA-MP Forums Archive
Help with loop through variable - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with loop through variable (/showthread.php?tid=264023)



Help with loop through variable - OUL - 24.06.2011

I wanna check what player on server had MOST score. How i can do that?


Re: Help with loop through variable - GangsTa_ - 24.06.2011

This could help you:

http://forum.sa-mp.com/showthread.ph...ighlight=score


Re: Help with loop through variable - OUL - 24.06.2011

I didn't find anything what could help me. Maybe you don't understand what i trying to do.

I trying to make script witch would do next:

Evrytime when will be 7 PM player with MOST score on server will get $10,000 but i don't know how to make that :-/


Re: Help with loop through variable - =WoR=Varth - 24.06.2011

loop through your database


Re: Help with loop through variable - OUL - 24.06.2011

idk i just wanna check what > online < player have the most scores


Re: Help with loop through variable - =WoR=Varth - 24.06.2011

pawn Код:
foreach(Player,i)
{
    new highest,highestid;
    if(GetPlayerScore(i) > highest)
    {
        highestid = i;
        highest = GetPlayerScore(i);
    }
}



Re: Help with loop through variable - OUL - 24.06.2011

Код:
error 017: undefined symbol "highest"
error 017: undefined symbol "highestid"
warning 215: expression has no effect
error 017: undefined symbol "highest"
Can you define me this variables?


Re: Help with loop through variable - =WoR=Varth - 24.06.2011

I edited my last post


Re: Help with loop through variable - OUL - 24.06.2011

Thanks i will test this


AW: Help with loop through variable - Nero_3D - 24.06.2011

You should put the variables outside of the loop