Originally Posted by Black_Sun1
of course this, but nvm
pawn Код:
if(strcmp(cmd, "/admincmds", true) == 0 || strcmp(cmd, "/acmd", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_RED, "You're not authorized to use this command!"); return 1; } new plevel = PlayerInfo[playerid][pAdmin]; new Adminhelp1[] = "/example /example /example /example /example /example "; new Adminhelp2[] = "/example /example /example /example /example /example "; new Adminhelp3[] = "/example /example /example /example /example /example /example /example "; new Adminhelp4[] = "/example /example /example /example /example /example "; new Adminhelp5[] = "/example /example /example /example "; new Adminhelp6[] = "/example /example /example /example /example /example "; new Adminhelp1337[] = "/example /example /example /example /example /example /example "; new Adminhelp1338[] = "/example /example /example /example /example /example /example /example "; new Adminhelpchat[] = "Type #<text> for the admin chat, or @<text> for the gamemaster chat."; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { if(plevel == 1) { format(string,sizeof(string), "%s\n%s",Adminhelp1[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); } else if(plevel == 2) { format(string,sizeof(string), "%s\n%s\n%s",Adminhelp1[],Adminhelp2[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); } else if(plevel == 3) { format(string,sizeof(string), "%s\n%s\n%s\n%s",Adminhelp1[],Adminhelp2[],Adminhelp3[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); } else if(plevel == 4) { format(string,sizeof(string), "%s\n%s\n%s\n%s\n%s",Adminhelp1[],Adminhelp2[],Adminhelp3[],Adminhelp4[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); } else if(plevel == 5) { format(string,sizeof(string), "%s\n%s\n%s\n%s\n%s\n%s",Adminhelp1[],Adminhelp2[],Adminhelp3[],Adminhelp4[],Adminhelp5[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); } else if(plevel == 6) { format(string,sizeof(string), "%s\n%s\n%s\n%s\n%s\n%s\n%s",Adminhelp1[],Adminhelp2[],Adminhelp3[],Adminhelp4[],Adminhelp5[],Adminhelp6[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); } else if(plevel == 1337) { format(string,sizeof(string), "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",Adminhelp1[],Adminhelp2[],Adminhelp3[],Adminhelp4[],Adminhelp5[],Adminhelp6[],Adminhelp1337[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); } else if(plevel == 1338) { format(string,sizeof(string), "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s",Adminhelp1[],Adminhelp2[],Adminhelp3[],Adminhelp4[],Adminhelp5[],Adminhelp6[],Adminhelp1337[],Adminhelp1338[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); } return 1; } } }
but this
pawn Код:
new Adminhelp1[] = "/example /example /example /example /example /example ";
and this
pawn Код:
if(plevel == 1) { format(string,sizeof(string), "%s\n%s",Adminhelp1[],Adminhelpchat[]); ShowPlayerDialog(playerid, 3168, DIALOG_STYLE_MSGBOX,"AVAILABLE COMMANDS:", string,"Ok"); }
are the errors
|