Dialog help
#8

Looking at the replies and solution you get,

You don't use integer's nor any dynamic value in the string, so why would you use format?
pawn Код:
new string[1000], string2[128], text[256];
                    format(text, 256,"/b, /me, /do, /shout, /time, /changepass /enter /exit, /animlist, /togradio, /hud, /cellphone, /afkers, /requestadmin, /plantradio");
                    strcat(string,text);
                    format(text, 256,"\n/drugs, /pay, /w, /give, /id, /pm, /shake, /tognews, /calllist, /takegun, /newspaper, /togf, /ame, /gloves, /rapsheet");
                    strcat(string,text);
                    format(text, 256,"\n/togpm, /changename, /wt, /setfreq, /accept, /coin, /walkstyle, /fightstyle, /putgun,/calculate,/togb, /cad, /mreport");
                    strcat(string,text);
                    format(text, 256,"\n/checkseatbelt, /pickitem, /tickets, /payticket, /guide, /ad, /prefix, /hidenumber, /silencer, /divorce, /blindfold, /unblind");
                    strcat(string,text);
                    format(text, 256,"\n/appearance, /describe, /inventory, /createnote, /deletenote, /notes, /givenote, /dragoffer, /clothing, /clearchat");
                    strcat(string,text);
                    format(text, 256,"\n/putciggy, /putbeer, /putwine, /takeciggy, /takebeer, /takewine, /payphone, /drop, /hiddennumber, /buildfire, /(ach)ievements");
                    strcat(string,text);
                    format(text, 256,"\n/f, /r, /quitfaction, /flist, /factionon, /factionhelp");
                    strcat(string,text);
                    //format(string,sizeof(string), text[0], text[1], text[2], text[3], text[4], text[5], text[6]);
                    format(string2,sizeof(string2),"Help");
                    ShowPlayerDialog(playerid,165,DIALOG_STYLE_MSGBOX,string2,string,"Options", "Cancel");
You can simply use strcat alone. Here is the best way:
pawn Код:
new string[1000];
                    strcat(string,"/b, /me, /do, /shout, /time, /changepass /enter /exit, /animlist, /togradio, /hud, /cellphone, /afkers, /requestadmin, /plantradio");
                    strcat(string,"\n/drugs, /pay, /w, /give, /id, /pm, /shake, /tognews, /calllist, /takegun, /newspaper, /togf, /ame, /gloves, /rapsheet");
                    strcat(string,"\n/togpm, /changename, /wt, /setfreq, /accept, /coin, /walkstyle, /fightstyle, /putgun,/calculate,/togb, /cad, /mreport");
                    strcat(string,"\n/checkseatbelt, /pickitem, /tickets, /payticket, /guide, /ad, /prefix, /hidenumber, /silencer, /divorce, /blindfold, /unblind");
                    strcat(string,"\n/appearance, /describe, /inventory, /createnote, /deletenote, /notes, /givenote, /dragoffer, /clothing, /clearchat");
                    strcat(string,"\n/putciggy, /putbeer, /putwine, /takeciggy, /takebeer, /takewine, /payphone, /drop, /hiddennumber, /buildfire, /(ach)ievements");
                    strcat(string,"\n/f, /r, /quitfaction, /flist, /factionon, /factionhelp");                    
                    ShowPlayerDialog(playerid,165,DIALOG_STYLE_MSGBOX,"Help",string,"Options", "Cancel");
Much faster than any of those methods, because i don't use format, nor create useless arrays for storing static data.
Reply


Messages In This Thread
Dialog help - by N0FeaR - 25.10.2015, 15:30
Re: Dialog help - by jlalt - 25.10.2015, 15:32
Re: Dialog help - by N0FeaR - 25.10.2015, 15:40
Re: Dialog help - by jlalt - 25.10.2015, 15:42
Re: Dialog help - by Mencent - 25.10.2015, 18:12
Re: Dialog help - by jlalt - 25.10.2015, 18:41
Re: Dialog help - by N0FeaR - 25.10.2015, 20:27
Re: Dialog help - by Gammix - 26.10.2015, 02:02

Forum Jump:


Users browsing this thread: 1 Guest(s)