Help with loop through variable
#1

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

This could help you:

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

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 :-/
Reply
#4

loop through your database
Reply
#5

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

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

Код:
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?
Reply
#8

I edited my last post
Reply
#9

Thanks i will test this
Reply
#10

You should put the variables outside of the loop
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)