SA-MP Forums Archive
How to mkae 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)
+--- Thread: How to mkae dialogs (/showthread.php?tid=374216)



How to mkae dialogs - NaBeeL[NxT] - 02.09.2012

Hello all pls help me
Pls tell me how to make Dialogs


Re: How to mkae dialogs - newbienoob - 02.09.2012

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog


Re: How to mkae dialogs - NaBeeL[NxT] - 02.09.2012


pls tell


Re: How to mkae dialogs - RanSEE - 02.09.2012

A small tuto here.

you will need
pawn Код:
#include <a_samp> // on top of your script
pawn Код:
#define DIALOG_WHATEVER 1
Then..
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
   if(strcmp(cmdtext, "/whatever",true) ==0)
   {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "$^SA-CNR^$ Rules", "_------ SA-CNR----_\n-No spamming\n-Don't evade death using filthy tricks\n-Don't ask for admin, we will ask you if we think you are good enough\n-Don't advertise here.\n-No Spamming at all, it will result in a kick/ban/mute.\n-Usage of anykind of mod/cheat is strictly prohibited, player found using such will be banned\n-Take a look at /shelp and /credits too.\n_----------------------------------_", "OK", "");
        return 1;
   }
NOTE: The text in it is random :3


Re: How to mkae dialogs - JessicaG - 02.09.2012

Dу this on top of script after the includes like a_samp:
pawn Код:
#define DIALOG_WELCOME 1 //Just an example you Can just change it later
Then on example OnPlayerConnect ADD this:
pawn Код:
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "header of dialog", "The input text", "button1", "button2");
This was just a sample if there is an special one tell us

And remember if you get the error code with input or something for too long text just use this code (one more sample code)

pawn Код:
new str[512];
strcat(str,"Johnsons House (/cj) \nMadd Dogg's Mansion (/mansion) \nAbandones AC tower (/at) \nDenise Bedroom (/denise)");
strcat(str,"\nRyder's House (/ryder) \nBrothel House (/brothel) \nTorreno's Ranch (/torreno) \nJefferson's Motel (/jeff) \nMillie's Bedroom (/millie) \nMichelle Love Nest (/mich)");
strcat(str,"\nSafe House (/safe) \nSafe House 2 (/safe2) \nUnused Safe House (/unsafe)");
strcat(str,"\nBig Smoke Palace (/bigsmoke) \nColonel Furhbers (/colonel)");

ShowPlayerDialog(playerid, DIALOG_HOUSES1, DIALOG_STYLE_LIST,"Houses", str, "Choose", "Back");
This was just a sample. Hopefully i guess this helped you out


Re: How to mkae dialogs - NaBeeL[NxT] - 02.09.2012

thanks all


Re: How to mkae dialogs - kbalor - 02.09.2012

Quote:
Originally Posted by JessicaG
Посмотреть сообщение
Dу this on top of script after the includes like a_samp:
pawn Код:
#define DIALOG_WELCOME 1 //Just an example you Can just change it later
Then on example OnPlayerConnect ADD this:
pawn Код:
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "header of dialog", "The input text", "button1", "button2");
This was just a sample if there is an special one tell us

And remember if you get the error code with input or something for too long text just use this code (one more sample code)

pawn Код:
new str[512];
strcat(str,"Johnsons House (/cj) \nMadd Dogg's Mansion (/mansion) \nAbandones AC tower (/at) \nDenise Bedroom (/denise)");
strcat(str,"\nRyder's House (/ryder) \nBrothel House (/brothel) \nTorreno's Ranch (/torreno) \nJefferson's Motel (/jeff) \nMillie's Bedroom (/millie) \nMichelle Love Nest (/mich)");
strcat(str,"\nSafe House (/safe) \nSafe House 2 (/safe2) \nUnused Safe House (/unsafe)");
strcat(str,"\nBig Smoke Palace (/bigsmoke) \nColonel Furhbers (/colonel)");

ShowPlayerDialog(playerid, DIALOG_HOUSES1, DIALOG_STYLE_LIST,"Houses", str, "Choose", "Back");
This was just a sample. Hopefully i guess this helped you out
Hi JessicaG. Thanks for demonstrating my teleport dialog for houses. that was.....

anyway.

@NaBeeL[NxT]
This is another way of making dialog text/string longer. if you occur this warning
error 075: input line too long (after substitutions)