SA-MP Forums Archive
Help - 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)
+--- Thread: Help (/showthread.php?tid=549364)



Help - Rudimental - 06.12.2014

I would like to make a list of where we were shown the top 10 richest people on the server but do not know how these checks performed ?


Re : Help - StreetRP - 06.12.2014

PHP код:
if (strcmp(cmd"/serrich"true) == 0)
{
        
SendClientMessage(playerid, -1"Rich :");
        for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
GetPlayerMoney(i) >= 1000000// If player have x or +x
                
{
                    
GetPlayerName(isendernamesizeof(sendername));
                    
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                    
format(string256"%s (%d) - Money : $%d"sendernameiGetPlayerMoney(i)); // format string
                    
SendClientMessage(playerid, -1string);
                }
            }
    }
    return 
1;