02.09.2012, 06:19
Hello all pls help me
Pls tell me how to make Dialogs
Pls tell me how to make Dialogs
#include <a_samp> // on top of your script
#define DIALOG_WHATEVER 1
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;
}
#define DIALOG_WELCOME 1 //Just an example you Can just change it later
ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "header of dialog", "The input text", "button1", "button2");
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");
Dу this on top of script after the includes like a_samp:
pawn Код:
pawn Код:
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 Код:
|