16.02.2017, 20:37
Quote:
I've tried that too **btw the return 1;} in the end is useless
The problem is when you make the command like that on the admin list you're getting shown with level 0. |
you don't need
Код:
if(PlayerInfo[playerid][pAdmin] > 0)
Код:
CMD:admins(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] > 0) { new string[50], string2[50]; SendClientMessage(playerid, COLOR_YELLOW, "Online Administrators:"); foreach(new i : Player) { if(PlayerInfo[i][pAdmin] >= 1) // set the number you want to show in /admins { GetPlayerName(i, string2, sizeof(string2)); format(string, sizeof(string), "%s | Admin Level: %d", string2, PlayerInfo[i][pAdmin]); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } return 1; } return 1; }
Код:
CMD:admins(playerid, params[]) { new string[50], string2[50]; SendClientMessage(playerid, COLOR_YELLOW, "Online Administrators:"); foreach(new i : Player) { if(PlayerInfo[i][pAdmin] >= 1) { GetPlayerName(i, string2, sizeof(string2)); format(string, sizeof(string), "%s | Admin Level: %d", string2, PlayerInfo[i][pAdmin]); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } return 1; } return 1; }