[Tutorial] How to create dialogs? - 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] How to create dialogs? (
/showthread.php?tid=511423)
How to create dialogs? -
Bingo - 05.05.2014
Deleted.
Re: How to create dialogs? [Well Explained] -
Lordzy - 07.05.2014
Didn't read the tutorial very well, though while going on quickly, I've noticed some mistakes.
Quote:
Originally Posted by Bingo
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 11) { if(response) { if(listitem == 0) { SendClientMessage(playerid, 0xFFFFFFFF, Your called an emergency service!); } if(listitem == 1) { SendClientMessage(playerid, 0xFFFFFFFF, You called an emergency service!); return 1; } return 0; } }
|
Message should be in quotes.
Quote:
Originally Posted by Bingo
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { switch( dialogid ) { case dialog_ask: { if(strfind("Hack","hacker",true)!= -1) { SendClientMessage(playerid,-1,"{00FF00}[OPERATOR]: {FFFFFF}Please use report feature ."); } return 1;
|
The function called
strfind finds the word from the second argument and return accordingly. Here, the second argument should be the inputtext, not a custom word you place there.
And while Kicking the player, ask them to do a delayed kick as since the launch of 0.3x version, kicks/bans are faster due to security related purposes. And most of them uses 0.3x and 0.3z.
Quote:
Originally Posted by Bingo
[*]\t - Makes a gap same as TAB in pawno.
|
Thanks for reminding me about this, recently I had been doing something which requires sort of alignment and what I've been doing was just tapping out the space button.
Re: How to create dialogs? [Well Explained] -
Bingo - 07.05.2014
Quote:
Originally Posted by Lordzy
Didn't read the tutorial very well, though while going on quickly, I've noticed some mistakes.
Message should be in quotes.
The function called strfind finds the word from the second argument and return accordingly. Here, the second argument should be the inputtext, not a custom word you place there.
And while Kicking the player, ask them to do a delayed kick as since the launch of 0.3x version, kicks/bans are faster due to security related purposes. And most of them uses 0.3x and 0.3z.
Thanks for reminding me about this, recently I had been doing something which requires sort of alignment and what I've been doing was just tapping out the space button.
|
Aha damn major mistake, Wrote on tablet. Sorry mate and thanks for correcting and you're welcome too.
*Corrected
Re: How to create dialogs? [Well Explained] -
gtakillerIV - 07.05.2014
You should seriously indent some of your examples man.
Re: How to create dialogs? [Well Explained] -
Bingo - 07.05.2014
Quote:
Originally Posted by gtakillerIV
You should seriously indent some of your examples man.
|
Haha, Sure next time
![smiley](images/smilies/smile.gif)
.
Re: How to create dialogs? [Not Well Explained] -
iAnonymous - 07.05.2014
Poor explanation !
Anyway Try to make it more clear and optimized .