[Tutorial] Using strcat(with colors)[zCmd][Random Cmd]
#1

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.
Reply


Messages In This Thread
Using strcat(with colors)[zCmd][Random Cmd] - by [SU]Spartan - 27.09.2014, 10:23
Re: Using strcat(with colors)[zCmd][Random Cmd] - by DavidBilla - 27.09.2014, 10:59
Re: Using strcat(with colors)[zCmd][Random Cmd] - by LivingLikeYouDo - 27.09.2014, 11:04
Re: Using strcat(with colors)[zCmd][Random Cmd] - by seanny - 27.09.2014, 12:21

Forum Jump:


Users browsing this thread: 1 Guest(s)