21.09.2013, 23:04
Hello everyone, I am having trouble with my dialog, and I don't know what's the problem..
So here are the codes. (The problem is that if I click yes, or neither no, it won't respond, so what's the problem?)
Btw, no errors.
Thanks in advance.
So here are the codes. (The problem is that if I click yes, or neither no, it won't respond, so what's the problem?)
Btw, no errors.
pawn Код:
#define DIALOG_WEAPONSHOP 1
pawn Код:
CMD:weaponshop(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF5C5C}Weapon shop", "{FFFFFF}Are you sure that you wish to leave your current position and visit the weapon shop?\n{FF0000}[NOTE]{FFFFFF} - You will return to your past position when you'll exit", "Leave", "Close");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_WEAPONSHOP)
{
if(response)
{
SetPlayerPos(playerid, 2390.3250,1158.0721,744.2016);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You've decided not to leave to the weapon shop! Have fun.");
}
return 1;
}
return 0;
}
Thanks in advance.