04.08.2014, 03:25
Example:
pawn Код:
case DIALOG_QUESTION2: //or whatever it is..
{
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid, DIALOG_QUESTION2, DIALOG_STYLE_INPUT, "What is my favorite color?", "Please enter Red or White", "Submit", "Cancel");
return 1;
}
if(strcmp(inputtext, "Red", true) == 0)
{
//correct answer..
return 1;
}
else if(strcmp(inputtext, "White", true) == 0)
{
SendClientMessage(playerid, -1, "Wrong Answer!");
Kick(playerid);
}
else
{
ShowPlayerDialog(playerid, DIALOG_QUESTION2, DIALOG_STYLE_INPUT, "What is my favorite color?", "Please enter Red or White.", "Submit", "Cancel");
return 1;
}
}
else
{
ShowPlayerDialog(playerid, DIALOG_QUESTION2, DIALOG_STYLE_INPUT, "What is my favorite color?", "Red or White?", "Submit", "Cancel");
}
}