15.03.2016, 16:06
Hey guys, i need help. I made myself an /admins command, which is supposed to show online admins and when there is no admin, it is supposed to show an dialog with no admins online, there is a code:
When i write a command, simply nothing happens, even if it would be a wrong command, it should show a note, i am using zcmd, so the command performs, but with no content.
If one of you guys would solve this problem for me, you will earn REP+.
Код:
CMD:admins(playerid, params[]) { new string[128]; new str[128]; new Admin[50]; if(PlayerInfo[playerid][pAdmin] == 2) Admin = "Moderбtor"; if(PlayerInfo[playerid][pAdmin] == 3) Admin = "Administrбtor"; if(PlayerInfo[playerid][pAdmin] == 4) Admin = "Vedъci Administrбtor"; if(PlayerInfo[playerid][pAdmin] == 5) Admin = "Hlavnэ Administrбtor"; for(new i = 0; i < MAX_PLAYERS; i ++) { if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0) { format(str, sizeof(str), "%s (%d) {FF0000}%s", GetName(i), i, Admin); strcat(string, str); ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_LIST, "Administrбtori", string, "Vybrať", "Zavrieť"); } if(!IsPlayerConnected(i) && PlayerInfo[i][pAdmin] > 0) { ShowPlayerDialog(playerid, DIALOG_NOADMINS, DIALOG_STYLE_MSGBOX, "Administrбtori", "Na servery nieje prнtomnэ ћiadny administrбtor", "Zavrieť", ""); } } return 1; }
If one of you guys would solve this problem for me, you will earn REP+.