How to add a rank? - 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: How to add a rank? (
/showthread.php?tid=410814)
How to add a rank? -
DerickClark - 26.01.2013
how to add the Admin rank
Code:
COMMAND:admins(playerid, params[])
{
new str[128],name[MAX_PLAYER_NAME];
SendClientMessage(playerid, 0xFFFFFFAA, "Admins Online:");
for(new i; i<=MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
GetPlayerName(i,name,sizeof(name));
format(str, sizeof(str), "%s[%d]",name, i);
SendClientMessage(playerid, 0xFFFFFFAA, str);
}
}
}
return 1;
}
Re: How to add a rank? -
mineralo - 26.01.2013
pawn Code:
COMMAND:admins(playerid, params[])
{
new str[128],name[MAX_PLAYER_NAME];
SendClientMessage(playerid, 0xFFFFFFAA, "Admins Online:");
for(new i; i<=MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (APlayerData[i][PlayerLevel] >= 1)
{
GetPlayerName(i,name,sizeof(name));
format(str, sizeof(str), "%s[%d] LVL:%d",name, i,APlayerData[i][PlayerLevel]);
SendClientMessage(playerid, 0xFFFFFFAA, str);
}
}
}
return 1;
}
Re: How to add a rank? -
DerickClark - 26.01.2013
Quote:
Originally Posted by mineralo
pawn Code:
COMMAND:admins(playerid, params[]) { new str[128],name[MAX_PLAYER_NAME]; SendClientMessage(playerid, 0xFFFFFFAA, "Admins Online:"); for(new i; i<=MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if (APlayerData[i][PlayerLevel] >= 1) { GetPlayerName(i,name,sizeof(name)); format(str, sizeof(str), "%s[%d] LVL:%d",name, i,APlayerData[i][PlayerLevel]); SendClientMessage(playerid, 0xFFFFFFAA, str); } } } return 1; }
|
ty can i add the admin Levels names Mod Head-Admin like that
AW: How to add a rank? -
Blackazur - 26.01.2013
You can, but you must add some where the Levels.
Re: How to add a rank? -
DerickClark - 26.01.2013
Ok i got that i think
Code:
// Holds the admin-levelnames
new AdminLevelName[6][24] =
{
{"Player"}, // Admin-level 0
{"Moderator"}, // Admin-level 1
{"Helper-admin"}, // Admin-level 2
{"Admin"}, // Admin-level 3
{"Head-admin"}, // Admin-level 4
{"Owner-admin"} // Admin-level 5
};
how to add a admin name in /admins?
Re: How to add a rank? -
DerickClark - 26.01.2013
How to put dis in
AdminLevelName[APlayerData[playerid][PlayerLevel]
Re: How to add a rank? -
Threshold - 27.01.2013
pawn Code:
format(str, sizeof(str), "%s %s[%d] LVL:%d",AdminLevelName[APlayerData[i][PlayerLevel]], name, i,APlayerData[i][PlayerLevel]);