How to make a test!
#1

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
Reply
#2

Look from other RP gamemodes, or request the script at the script request thread.
https://sampforum.blast.hk/showthread.php?tid=118885
Reply
#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
#4

awesome thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)