26.10.2015, 02:02
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?
You can simply use strcat alone. Here is the best way:
Much faster than any of those methods, because i don't use format, nor create useless arrays for storing static data.
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");
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");