06.05.2012, 22:18
eu dou /admins mais sу estб aparecendo 1 admin na dialog ;s
sempre fica na dialog o ultimo adm que entra no server.
sempre fica na dialog o ultimo adm que entra no server.
Код:
COMMAND:admins(playerid, params[]) { new s[128]; new ss[128]; for(new i = 0; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][pAdmin] > 0) { GetPlayerName(i, Jogador, sizeof(Jogador)); format(s, 128, "{FFFFFF}%s {FF00FF}[%s]", Jogador, admins(i)); strcat(s, ss, sizeof(s)); } } ShowPlayerDialog(playerid, DIALOG_Admins, DIALOG_STYLE_MSGBOX, " {FF00FF}*** {FFFFFF}ADMIN'S ONLINE {FF00FF}***", s, "fechar", ""); return true; }
Код:
admins(playerid) { new String[64]; if(PlayerInfo[id][pAdmin] == 1) String = "Moderador"; else if(PlayerInfo[playerid][pAdmin] == 2) String = "NНVEL 2"; else if(PlayerInfo[playerid][pAdmin] == 3) String = "NНVEL 3"; else if(PlayerInfo[playerid][pAdmin] == 4) String = "NНVEL 4"; else if(PlayerInfo[playerid][pAdmin] == 5) String = "NНVEL 5"; return String; }