How to mkae dialogs
#1

Hello all pls help me
Pls tell me how to make Dialogs
Reply
#2

https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog
Reply
#3


pls tell
Reply
#4

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
Reply
#5

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
Reply
#6

thanks all
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)