14.04.2011, 22:11
Admin cmd like this:
But in strmp How to make it?
pawn Код:
dcmd_admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
{
if(AccInfo[i][Level] > 5) {
AdmRank = "Professional Admin";
}
if(IsPlayerAdmin(i)) AdmRank = "RCON Administrator";
else
switch(AccInfo[i][Level])
{
case 1: AdmRank = "Basic Moderator";
case 2: AdmRank = "Moderator";
case 3: AdmRank = "Master Moderator";
case 4: AdmRank = "Administrator";
case 5: AdmRank = "Master Administrator";
}
format(string, 128, "%s (Id:%i) | Level: %d - %s",PlayerName2(i),i,AccInfo[i][Level], AdmRank);
SendClientMessage(playerid, LIGHTBLUE2, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}