Dialog size
#8

Notepad++ is the editor, it still uses pawncc.exe to compile the scripts.

You can declare a string with a default value (text for our case) so cmds_admin contains up to level 4 which doesn't give the error about too long line and the level 5 part which was left out is then "joined" along with the rest.

If you don't want to re-create the string over and over again if the listitem is 7, you may use static local but you will need another static local (they hold the previous value) so it can know when it was the first time called and joined the text once.

pawn Код:
case 7:
{
    static proceed, cmds_admin[528] =
    "{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n" \
    "{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime\n" \
    "{7340DB}Level 3{FFFFFF} - /vdestroy, /heal, /giveweapon, /setskin, /givemoney, /deleteport, /deleteallreports, /setfuel\n" \
    "{8CED15}Level 4{FFFFFF} - /oban, /unban, /sac, /vehicle, /healall, /dycmds, /setsmember, /setname\n";

    if (!proceed)
    {
        strcat(cmds_admin, "{37DB45}Level 5{FFFFFF} - /setadmin, /setadminuc, /gmx, /asetpass");
        proceed = 1;
    }
   
    ShowPlayerDialog(playerid, DIALOG_CMDS_ADMIN, DIALOG_STYLE_MSGBOX, "{FF0000}Admininstrator Commands", cmds_admin, "Back", "Close");
}
Reply


Messages In This Thread
Dialog size - by Tass007 - 19.08.2016, 08:49
Re: Dialog size - by Konstantinos - 19.08.2016, 09:00
Re: Dialog size - by Tass007 - 19.08.2016, 09:11
Re: Dialog size - by DeeadPool - 19.08.2016, 09:40
Re: Dialog size - by Tass007 - 19.08.2016, 10:04
Re: Dialog size - by Konstantinos - 19.08.2016, 10:20
Re: Dialog size - by Tass007 - 19.08.2016, 10:43
Re: Dialog size - by Konstantinos - 19.08.2016, 10:56

Forum Jump:


Users browsing this thread: 2 Guest(s)