Dialog responce help -
Xenforox - 12.06.2014
I made a dialog (msgbox type) and i made the responce but it's not working,
Код:
if(dialogid == DIALOG_JOB)
{
if(response)
{
SendClientMessage(playerid, COLOR_GREEN, "you accepted the job");
}
else
{
SendClientMessage(playerid, COLOR_RED, "you declined the job");
}
return 1;
}
}
return 0;
The dialog is showing but the responce is not working. help me please
Re: Dialog responce help -
Rufio - 12.06.2014
You put an extra bracket, try this one
pawn Код:
if(dialogid == DIALOG_JOB)
{
if(response)
{
SendClientMessage(playerid, COLOR_GREEN, "you accepted the job");
}
else
{
SendClientMessage(playerid, COLOR_RED, "you declined the job");
}
}
return 0;
}
Re: Dialog responce help -
Rittik - 12.06.2014
Код:
if(dialogid == DIALOG_JOB)
{
if(response)
{
SendClientMessage(playerid, COLOR_GREEN, "you accepted the job");
}
else
{
SendClientMessage(playerid, COLOR_RED, "you declined the job");
}
return 1;
}
return 0;
EDIT: Late
Re : Dialog responce help -
Xenforox - 12.06.2014
Still not working, it's compiling but nothing happen when i execute the command
Re: Dialog responce help -
Laure - 12.06.2014
Can we see your ShowDialog which provides the given response?
Re : Dialog responce help -
Xenforox - 12.06.2014
Код:
howPlayerDialog(playerid, DIALOG_JOB, DIALOG_STYLE_MSGBOX, "Job", "do you want to join this job ?", "Continue", "Close");
Re: Dialog responce help -
NewerthRoleplay - 12.06.2014
Firstly you should definitely indent your code properly, and also what ID have you defined DIALOG_JOB as?
pawn Код:
ShowPlayerDialog(playerid, DIALOG_JOB, DIALOG_STYLE_MSGBOX, "Job", "Do you want to join this job?", "Yes", "No");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_JOB)
{
if(response)
{
SendClientMessage(playerid, COLOR_GREEN, "You accepted the job!");
}
else
{
KickWithMessage(playerid, COLOR_RED, "You declined the job.");
}
return 1;
}
return 0;
}
Re: Dialog responce help -
Laure - 12.06.2014
Do think anything's wrong there, change DIALOG_JOB into a numeric value and try, if that works, not sure though.