08.11.2014, 22:39
I've got a dialog but when i typee the command it does not show up, can anyone help me please
It just pops up with unknown command (These commands are just test commands, not real ones)
Код:
ACMD:cmds(playerid, params[]) { new str[300], str1[1000]; if (pInfo[playerid][Adminlevel] < 0) return 0; format(str, sizeof(str), "PLAYER COMMANDS"); strcat(str1, str); format(str, sizeof(str), "/player - check a player\n"); strcat(str1, str); if (pInfo[playerid][Adminlevel] < 2) return 0; { format(str, sizeof(str), "MOD COMMANDS"); strcat(str1, str); format(str, sizeof(str), "/a - Admin Chat\n"); strcat(str1, str); format(str, sizeof(str), "/spec - Spectate a player\n"); strcat(str1, str); } if (pInfo[playerid][Adminlevel] < 3) return 0; { format(str, sizeof(str), "ADMIN COMMANDS"); strcat(str1, str); format(str, sizeof(str), "/wank - test"); strcat(str1, str); format(str, sizeof(str), "/hello - hello world"); strcat(str1, str); } if (pInfo[playerid][Adminlevel] < 4) return 0; { format(str, sizeof(str), "LEAD ADMIN COMMANDS"); strcat(str1, str); format(str, sizeof(str), "/ok - ok msg"); strcat(str1, str); format(str, sizeof(str), "/no - say no to world"); strcat(str1, str); } if (pInfo[playerid][Adminlevel] < 5) return 0; { format(str, sizeof(str), "OWNER COMMANDS"); strcat(str1, str); format(str, sizeof(str), "/what - what the fuck"); strcat(str1, str); format(str, sizeof(str), "/die - kill a nigga\n"); strcat(str1, str); } ShowPlayerDialog(playerid, DIALOG_CMD, DIALOG_STYLE_MSGBOX, "Commands", str1, "Close", ""); return 1; }