[Tutorial] Dialogs
#1

Intro:-
Hi Guyz Today I will do a small tutorial on How To Make Dialog. I know Its simple and You may think this is a useless tutorial But Many New Scripters Have problems In Dialogs. So here's It. This isn't a tutorial Of How to make them

Basics Of Dialogs :-
So before Making a dialog you need to ensure many things Or You will mess all up. So just read the following Points On How To do that :-
NEVER ever Add Two Dialogs WITH Same Dialog Id. Never ever do that or You will mess everthing up...
Always return 0 After OnDialogResponse ...
Always name each and every dialog you are making..

Let's Start :-
Ok so before creating dialogs you need to be cool minded and think What do you exactly want the dialog to be... There are 3 types You can see it here https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog
Ok So first we have to include a_samp That usally Is already included Or your script Wont Work BUMP!
Anyways Lets continue....
So we will go according to the Basics Points and things about dialogs So first We Will define the dialog add this at the top of your script
Code:
#define DIALOG_TEST 1000000 // Here I have given a Huge number on a Purpose It will be used later
We have completed Half and main thing Now what you have to do is Instead Of This
Code:
ShowPlayerDialog(playerid, dialogid ..... // Instead of the Dialog id That's 1000000 In this case
We will make it
Code:
ShowPlayerDialog(playerid, DIALOG_TEST // the name of the dialog
and you done !!

Why Should You use this ? :-
Answer is because Suppose you add a FS And you didn't Check the dialog id's And if its 1 And you too add a dialog 1 Then You will mess things Up

Extra Info and Tips :-
  • Never Make two dialogs Of same id
  • Always use Names For dialogs and Add it like this DIALOG_YOURNAMEHERE
  • Most important thing always Choose A high number like 1000000
  • Last one Always Check all dialogs and make a list sort of to prevent your dialogs From getting Ruined
And please Do not Rep Me for this I request You because This is just a Small tutorial For New scripters Thanks !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)