28.03.2014, 21:40
Command spam and not showing names?
[14:45:26] Test({FFFF00}{FFFFFF})
[14:45:26] Test({FFFF00}{FFFFFF})
[14:45:26] Test({FFFF00}{FFFFFF})
[14:45:26] Test({FFFF00}{FFFFFF})
[14:45:26] Test({FFFF00}{FFFFFF})
pawn Код:
stock LevelName(playerid)
{
new Regular[128];
new Admin[128];
switch(PlayerInfo[playerid][pAdmin])
{
case 0: Regular = "Regular player";
case 1: Admin = "Moderator";
case 2: Admin = "Administrator";
}
return Admin;
}
CMD:admins(playerid)
{
new Count;
new str[45], Admin[MAX_PLAYER_NAME];
SendClientMessage(playerid, -1, "Online Staff Members:");
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(PlayerInfo[i][pAdmin] < 2)
{
Count ++;
GetPlayerName(i, Admin, MAX_PLAYER_NAME);
format(str, sizeof str, "%s ({FFFF00}%s{FFFFFF})",Admin, LevelName(i));
SendClientMessage(playerid, -1, str);
}
}
if(Count < 1) SendClientMessage(playerid, -1, "No Admins Online");
return 1;
}
[14:45:26] Test({FFFF00}{FFFFFF})
[14:45:26] Test({FFFF00}{FFFFFF})
[14:45:26] Test({FFFF00}{FFFFFF})
[14:45:26] Test({FFFF00}{FFFFFF})