How to make a test!
#3

OnPlayerText


or

DIALOG quoted from Script request thread.
Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
You could have done it with some messages and onplayertext but since the dialogs are here just use a list
pawn Код:
#define D_Question (2342)

ShowPlayerDialog(playerid, D_Question, DIALOG_STYLE_LIST,
 "Who is the current president of the USA?", "\
  Bush\r\n\
  Obama\r\n\
  Clinton"
, "Ok", "Cancel");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == D_Question)
    {
        if(!response)
            return ShowPlayerDialog(playerid, D_Question, DIALOG_STYLE_LIST, "Who is the current president of the USA?", "Bush\r\nObama\r\nClinton", "Ok", "Cancel");
        if(listitem == 2) //not sure if this is 2 or 1 - correct me if the list starts with 0 not with 1
        { //correct answer
        }
        return 1;
    }
    return 0;
}


I see no mistake in his code. What do you mean with bugged ? Explain...
Reply


Messages In This Thread
How to make a test! - by CT_Ronnie_Deo - 03.08.2010, 09:30
Re: How to make a test! - by [MWR]Blood - 03.08.2010, 12:33
Re: How to make a test! - by Retardedwolf - 03.08.2010, 12:39
Re: How to make a test! - by CT_Ronnie_Deo - 03.08.2010, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)