21.01.2011, 10:57
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?
How do i do this?
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Title", "Information", "Button 1", "Button");
if(dialogid == dialogid)
{
if(response == 0)
{
Kick(playerid);
}
if(response == 1)
{
SendClientMessage(playerid, NAME_COLOR, "Thank you for accepting the rules");
}
}
return 1;
}
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Title", "Don't accept rules\nAccept Rules", "Proceed", "Cancel");
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;
}
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Title", "Information", "Button 1", "Button 2");
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;
}