SA-MP Forums Archive
How to make a test! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to make a test! (/showthread.php?tid=165078)



How to make a test! - CT_Ronnie_Deo - 03.08.2010

How do I make a test...

Like it says What is our website?
a.
b.
c.
d.

and if answer is correct then I can set a it in my cfg... but I want it like in registration... where the answer is a word not a command


Re: How to make a test! - [MWR]Blood - 03.08.2010

Look from other RP gamemodes, or request the script at the script request thread.
https://sampforum.blast.hk/showthread.php?tid=118885


Re: How to make a test! - Retardedwolf - 03.08.2010

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...



Re: How to make a test! - CT_Ronnie_Deo - 03.08.2010

awesome thanks