Quote:
Originally Posted by ShoortyFl
This is something that i want it to look alike, i found the picture online
|
Here is mine:
pawn Код:
CMD:admins(playerid, params[])
{
new count = 0, name[24], stringON[128], stringOFF[258];
SendClientMessage(playerid, COLOR_LIGHTBLUE, ""SERVER_NAME" Administrators Online");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][pAdminLevel] >= 1)
{
if(aDuty[i] == 1)
{
GetPlayerName(i, name, sizeof(name));
format(stringON, sizeof(stringON), "%s %s [ID: %i] [{33FF00}ON-DUTY{FFFFFF}]", GetAdminRankCOLOR(i), GetName(i), i);
SendClientMessage(playerid, -1, stringON);
count ++;
}
else if(aDuty[i] == 0)
{
GetPlayerName(i, name, sizeof(name));
format(stringOFF, sizeof(stringOFF), "%s %s [ID: %i] [{FF0000}OFF-DUTY{FFFFFF}]", GetAdminRankCOLOR(i), GetName(i), i);
SendClientMessage(playerid, -1, stringOFF);
count ++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "[!] No Administrators Online");
}
return 1;
}
pawn Код:
stock GetAdminRankCOLOR(i)
{
new tmpString[32];
switch(PlayerInfo[i][pAdminLevel])
{
case 0: format(tmpString, sizeof(tmpString), "Player");
case 1: format(tmpString, sizeof(tmpString), "{FF0000}A1{FFFFFF}");
case 2: format(tmpString, sizeof(tmpString), "{FF0000}A2{FFFFFF}");
case 3: format(tmpString, sizeof(tmpString), "{FF0000}A3{FFFFFF}");
case 4: format(tmpString, sizeof(tmpString), "{FF0000}A4{FFFFFF}");
case 5: format(tmpString, sizeof(tmpString), "{FF0000}A5{FFFFFF}");
case 6: format(tmpString, sizeof(tmpString), "{FF0000}A6{FFFFFF}");
case 7: format(tmpString, sizeof(tmpString), "{FF0000}A7{FFFFFF}");
default: format(tmpString, sizeof(tmpString), "Undefined Admin");
}
return tmpString;
}
pawn Код:
stock GetName(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
return pName;
}