SA-MP Forums Archive
Help top - 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 top (/showthread.php?tid=574492)



Help top - BlackEvils - 17.05.2015

Who can help me to give me server top 10 players with more money

for example:

On this list you will found to moust rich players of this server

.1 Player Name - Money he have
.2
.3
.4
.5
...


Re: Help top - SickAttack - 17.05.2015

http://forum.sa-mp.com/showpost.php?...2&postcount=44


Re: Help top - StR_MaRy - 17.05.2015

Quote:

if (strcmp(cmd, "/richlist", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] > 32|| !IsPlayerAdmin(playerid))
{
SCM(playerid, COLOR_LIGHTRED, "|_____________________________ Rich List Online _____________________________|");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerMoney(i) >= 1000000 || PlayerInfo[i][pAccount] >= 1000000)
{
GetPlayerName(i, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, 256, "%s (%d) - Hand: $%d | Bank: $%d", sendername, i, GetPlayerMoney(i), PlayerInfo[i][pAccount]);
SCM(playerid, COLOR_WHITE, string);
}
}
}
}
}
return 1;
}

use this


Re: Help top - icra - 18.05.2015

Quote:
Originally Posted by StR_MaRy
Посмотреть сообщение
use this
Man, that's not a ranking and i don't think your gamemode script would be compatible with his.
And... begin indenting your code, because it's unreadable.

Suggest you working with this include: https://sampforum.blast.hk/showthread.php?tid=361560