SA-MP Forums Archive
[Tutorial] Using strcat(with colors)[zCmd][Random Cmd] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Using strcat(with colors)[zCmd][Random Cmd] (/showthread.php?tid=539272)



Using strcat(with colors)[zCmd][Random Cmd] - [SU]Spartan - 27.09.2014

Introduction
I'm making this tutorial because ShowPlayerDialog allows only 5-6 lines so incase someone wants more lines to add can use strcat.
(Color codes: http://html-color-codes.info/ )

(Download zCmd here: https://sampforum.blast.hk/showthread.php?tid=91354 )

Codes
First of all we need to make a (new "howyou want to name the dialog"["dialogid"] So i name it "cmdsdialog" with ID "2999"
Код:
CMD:teles(playerid,params[])//I show u how i created /teles
{
new cmdsdialog[2999];
return 1;
}
Now we have to add the messages:
Код:
CMD:teles(playerid,params[])
{
new cmdsdialog[2999];
strcat(cmdsdialog,"{EB1B1B}Red color/entertexthere\n"); // "{EB1B1B}" is the color
strcat(cmdsdialog,"{EB1B1B}Red color/entertexthere\n");//"{EB1B1B}" is the color
return 1;
}
So once you added it we should add boarder's name:
Код:
CMD:teles(playerid,params[])
{
new cmdsdialog[2999];
strcat(cmdsdialog,"{EB1B1B}Red color/entertexthere\n");//"{EB1B1B}" is the color
strcat(cmdsdialog,"{EB1B1B}Red color/entertexthere\n");//"{EB1B1B}" is the color
ShowPlayerDialog(playerid,0,0,"Player Teleports",cmdsdialog,"Okay","Close");//"Okay"is button1,"Close"is button2
return 1;
}
Something went wrong or you need help?Lemme know.



Re: Using strcat(with colors)[zCmd][Random Cmd] - DavidBilla - 27.09.2014

Why not use format?


Re: Using strcat(with colors)[zCmd][Random Cmd] - LivingLikeYouDo - 27.09.2014

That string length made me laugh my head off.


Re: Using strcat(with colors)[zCmd][Random Cmd] - seanny - 27.09.2014

That string length? R.I.P low-end servers.