12.11.2017, 12:11
Hello guys,
I have some trouble with /admins command. Take a look:
Code here:
I have some trouble with /admins command. Take a look:
Code here:
Код:
CMD:admins(playerid, params[]) { if(PlayerInfo[playerid][pHour] >= 2 || PlayerInfo[playerid][pAdminLevel] >= 1 || PlayerInfo[playerid][pVIP] >= 1) { new adminstring[128],countadmin=0; if(IsPlayerConnected(playerid)) { for (new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdminLevel] > 0) { format(adminstring, sizeof(adminstring),"Name\tPosition\tStatus\n\%s%s\t%s\t%s\n", adminstring, GetName(i),GetAdminName(i),GetAdminOnlineStatus(i)); countadmin++; } } } ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_TABLIST_HEADERS,"{00CED1}Online Staff Members",adminstring,"{00CED1}Close",""); } if(countadmin == 0) return ShowPlayerDialog(playerid, DIALOG_NOONLINE, DIALOG_STYLE_MSGBOX,"{00CED1}Online Staff Members","No Staff members online","{00CED1}Close",""); } return 1; }