Dialog System - Printable Version +- ElitesHost Forums (https://forum.eliteshost.com) +-- Forum: Community (https://forum.eliteshost.com/forumdisplay.php?fid=5) +--- Forum: Information & Guidelines (https://forum.eliteshost.com/forumdisplay.php?fid=16) +---- Forum: Tutorials (https://forum.eliteshost.com/forumdisplay.php?fid=17) +---- Thread: Dialog System (/showthread.php?tid=189) |
Dialog System - alimaroco - 04-13-2017 Hello guys, today i'm going to show you how to detail anything you want in any dialog! That's very easy but yet some people do not know how to do so. So, i made this tutorial to show them some examples of it. So, without wasting times, we'll start our tutorial! STEP 1 - USING FORMAT
So, about using formats, it's really very simple. I'll show you an example of it right now. PHP Code: Code: CMD:name(playerid,params[]) You see, it's very simple. But now, instead of using SendClientMessage, we will change it to ShowPlayerDialog! Format explained more easily here! STEP 2 - SHOWPLAYERDIALOG
So, now we will change the same thing to showplayerdialog! PHP Code: Code: CMD:name(playerid,params[]) So now, we have formatted it to ShowPlayerDialog! Additional Note: While formatting to message, use \n for the dialog to skip one line! And also instead of usig DIALOG_STYLE_MSGBOX you can use any type of dialog style, this doesn't require only DIALOG_STYLE_MSGBOX! STEP 3 - STRCAT
So, we use strcat to make really long dialog without making them crashing, strcat has also other more purposes. Here, strcat is more explained! PHP Code: Code: CMD:name(playerid,params[]) STEP 4 - DEFINE THEM
So, now we are going to define the IDs of the dialogs we are going to be using. Defining dialogs are important! If we do not define them, we can make another dialog and use an already defined id for a dialog. So, let's proceed in for more information. PHP Code: Code: enum END OF TUTORIAL
Credits Karan007 - Created this tutorial Jim - Created this tutorial SA-MP Team - Created SA-MP Y_Less - Sscanf Zeex - ZCMD PawnHunter - Strcat suggestion MartinSwag - Defining suggestion TheBetaFox - Strcat tutorial RE: Dialog System - Emirto - 08-19-2017 That's Nice .. Show us more RE: Dialog System - joker123 - 08-19-2017 Thx for sharing @alimaroco. But very old thread, must be closed. |