PDA

View Full Version : [Include] [INC]HighestTopList Updated 04.07


smeti
06/04/2010, 11:26 AM
Toplist function:

Admins command:

new
Admin_Rank[][] = {"New Admin", "Admin Cadet", "Moderator", "Administrator", "Head Administrator" };

COMMAND:admins(playerid,params[])
{
#define TOPLINE 10 // Edited max top line
new
Count,
Player_ID[TOPLINE],
Top_Info[TOPLINE];

foreach(Player, forplayerid)
// for(new forplayerid, max_players = GetMaxPlayers(); forplayerid < max_players; forplayerid++)
{
// if(!IsPlayerConnected(forplayerid)) continue;
if(PlayerInfo[forplayerid][Level] < 1) continue;
HighestTopList(forplayerid, PlayerInfo[forplayerid][Level], Player_ID, Top_Info, TOPLINE);
Count++;
}
SendClientMessage(playerid, 0xFFFFFFAA, " [ Online Admins: ] ");
if(Count)
{
new
string[128];
for(new i = 0; i < TOPLINE; i++)
{
if(Top_Info[i] <= 0) continue;
format(string, sizeof string, " >< %s ID:%d | Level: %d | %s", pName(Player_ID[i]), Player_ID[i], Top_Info[i], Admin_Rank[Top_Info[i]-1]);
SendClientMessage(playerid, 0x0099FFAA, string);
}
} else {
SendClientMessage(playerid, 0x0099FFAA, "No Administrator Online");
}
#undef TOPLINE
return 1;
}


Richlist command:

COMMAND:richlist(playerid,params[])
{
#define TOPLINE 10
new
Player_ID[TOPLINE],
Top_Info[TOPLINE];

foreach(Player, i)
// for(new i, max_players = GetMaxPlayers(); i < max_players; i++)
{
// if(!IsPlayerConnected(i)) continue;
HighestTopList(i, GetPlayerMoney(i), Player_ID, Top_Info, TOPLINE);
}

SendClientMessage(playerid, 0xFFFFFFAA, "Rich List:");

new
string[128];
for(new i; i < TOPLINE; i++)
{
if(Top_Info[i] <= 0) continue;
format(string, sizeof string, " %s ID:%d - $%d", pName(Player_ID[i]), Player_ID[i], Top_Info[i]);
SendClientMessage(playerid, 0xFFFFFFAA, string);
}
#undef TOPLINE
return 1;
}


GetPlayerName function by DracoBlue

stock pName(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}


Download:
http://solidfiles.com/info_imgs/pXxl.jpg (http://solidfiles.com/d/pXxl)
http://solidfiles.com/info_imgs/NXZi.jpg (http://solidfiles.com/d/NXZi)

ineoncore
06/04/2010, 12:02 PM
Good job

Lorenc_
06/04/2010, 12:47 PM
thats cool but some people use dcmd and strtok so maybe u could convert it to that just a opinion

smeti
06/04/2010, 01:18 PM
thats cool but some people use dcmd and strtok so maybe u could convert it to that just a opinion


:mrgreen:

Convert:
zcmd:

COMMAND:admins(playerid,params[]) {

dcmd:

dcmd_admins(playerid,params[]) {
#pragma unused params

ziomal432
06/04/2010, 01:42 PM
by ?

DracoBlue xD

Zh3r0
06/04/2010, 02:14 PM
by ?

DracoBlue xD

Who did you quoted there?...

Nice script dude :)

XRVX
06/04/2010, 02:16 PM
looks nice
good work
8)

smeti
06/04/2010, 05:25 PM
by ?

DracoBlue xD

Thanks.

aircombat
06/04/2010, 07:28 PM
nice work , 5/5 using it.;)

dnsdj
07/04/2010, 03:37 AM
nice :D

smeti
07/04/2010, 07:22 AM
Thanks all.

Updated HighestTopList function.

Lorenc_
07/04/2010, 09:08 AM
thats cool but some people use dcmd and strtok so maybe u could convert it to that just a opinion


:mrgreen:

Convert:
zcmd:

COMMAND:admins(playerid,params[]) {

dcmd:

dcmd_admins(playerid,params[]) {
#pragma unused params






my bad im stupid cuz i forgot lol

iMonk3y
26/01/2011, 09:00 PM
Hey, I use your HighestTopList in my Killing Spree release... just wondering which nick, Phento or smeti you mostly use, which one you want in the credits :D

smeti
26/01/2011, 09:09 PM
Hey, I use your HighestTopList in my Killing Spree release... just wondering which nick, Phento or smeti you mostly use, which one you want in the credits :D

Phento

Thanks