Player Dialog How to change function of second button? - 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: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Player Dialog How to change function of second button? (
/showthread.php?tid=214431)
Player Dialog How to change function of second button? -
Legit_V20 - 21.01.2011
I have set up a dialog box, And i need to either make the function of the second button not matter, Or change the function of it.
How do i do this?
Re: Player Dialog How to change function of second button? -
ExeC - 21.01.2011
pawn Код:
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Title", "Information", "Button 1", "Button");
OnDialogResponse:
pawn Код:
if(dialogid == dialogid)
{
if(response == 0)
{
Kick(playerid);
}
if(response == 1)
{
SendClientMessage(playerid, NAME_COLOR, "Thank you for accepting the rules");
}
}
return 1;
}
Re: Player Dialog How to change function of second button? -
Legit_V20 - 21.01.2011
This isnt a messagebox bro is a list, Can you help me out on that?
Re: Player Dialog How to change function of second button? -
ExeC - 21.01.2011
pawn Код:
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Title", "Don't accept rules\nAccept Rules", "Proceed", "Cancel");
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == dialogid)
{
if(response)
{
if(listitem == 0)
{
Kick(playerid);
}
if(listitem == 1)
{
SendClientMessage(playerid, NAME_COLOR, "Thank you for accepting the rules");
}
return 1;
}
}
return 1;
}
Re: Player Dialog How to change function of second button? -
HyperZ - 21.01.2011
Example:
OnPlayerConnect:
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Title", "Information", "Button 1", "Button 2");
OnDialogResponse:
pawn Код:
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, -1, "You clicked on Button 2");
//bla bla bla
}
if(response)
{
if(listitem == 0)
{
//bla bla bla
}
}
return 1;
}
Re: Player Dialog How to change function of second button? -
Legit_V20 - 21.01.2011
wholy shit i have been working on that for litteraly hours now thanks so much for ur answers. I really appreciate it i am sleep deprived because of this lol thanks a lot guys ima hit u up when im done with my server so u can come on i wont accept no for an answer lol