Problem OnDialogResponse - 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: Problem OnDialogResponse (
/showthread.php?tid=359457)
Problem OnDialogResponse -
Raphy - 14.07.2012
Hello, I made 2 dialogues at mustlogin and mustregister like on luxadmin but I don't have public OnDialogResponse in the admin system. And I don't know how to make it because I'm not that skilled. I use ladmin4v2.
Code:
if(ServerInfo[MustLogin] == 1 && PlayerInfo[playerid][Registered] == 1 && PlayerInfo[playerid][LoggedIn] == 0)
{
#if USE_DIALOGS == true
new lstring[256];
format(lstring,256,"That account '%s 'is Registered!\n\n Login to access your Account:",pName(playerid));
ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_INPUT,"Login Account",lstring,"Login","Quit");
#endif
return 1;
}
if(ServerInfo[MustRegister] == 1 && PlayerInfo[playerid][Registered] == 0)
{
#if USE_DIALOGS == true
new rstring[256];
format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");
#endif
return 1;
}
Please help me make public OnDialogResponse. Thank you.
Re: Problem OnDialogResponse -
Avi57 - 14.07.2012
Try yourself
https://sampwiki.blast.hk/wiki/OnDialogResponse
Re: Problem OnDialogResponse -
[MM]RoXoR[FS] - 14.07.2012
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOGID+67:
{
//LOGIN CODE
}
case DIALOGID+66:
{
//REGISTER CODE
}
}
return 1;
}
Re: Problem OnDialogResponse -
Raphy - 14.07.2012
Thanks a lot for your help.