25.12.2018, 18:54
Код:
CMD:admins(playerid) { new flag = 0, str[128]; SendClientMessage(playerid, COLOR_AQUA, "Administrators online:"); foreach(new i:Player) { if(PlayerInfo[playerid][pAdmin] > 0) { flag = 1; if(PlayerInfo[playerid][pAdmin] == KEY_ACTION) return format(str, sizeof(str), "{00ff6b}[Paused]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i)); if(PlayerInfo[playerid][pAdminDuty] == 1) { format(str, sizeof(str), "{00ff6b}[Available]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i)); } else format(str, sizeof(str), "{FF0000}[Unavailable]{FFFFFF} %s: %s", ReturnAdminLevel(i), ReturnName(i)); return SendClientMessage(i, -1, str); } } if(flag == 0) return SendClientMessage(playerid, -1, "There are no admins available currently."); return 1; }
However, it's not working as intended, and I can't find the issue. Maybe someone can help? Much appreciated.