24.06.2015, 15:13
pawn Код:
CMD:admins(playerid, params[])
{
new
string[50];
SendClientMessage(playerid, COLOR_GREY, "Admins online:");
foreach(Player, i)
{
if(IsPlayerConnected(i))
{
if(pInfo[i][pAdmin] >= 1)
{
if(pInfo[i][pDuty] == true)
{
format(string, sizeof(string),"(ID: %d) %s(Admin level: %d)", i, PlayerName(i), pInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_ORANGE, string);
}
else
{
format(string, sizeof(string),"(ID: %d) %s (Admin level: %d)", i, PlayerName(i), pInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
}
return 1;
}
pawn Код:
CMD:myname(playerid, params[]) // ne radi
{
if(pInfo[playerid][pAdmin] < 1)
return SendClientMessage(playerid, COLOR_RED, "No permission.");
if(isnull(params))
return SendClientMessage(playerid, -1, "Usage: /myname [your name]");
strcpy(pInfo[playerid][pAdminName], params, 10);
return 1;
}
That /admins command is withouth this /myname stuff..