SA-MP Forums Archive
how can i make an questions on my server? - 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 can i make an questions on my server? (/showthread.php?tid=90340)



how can i make an questions on my server? - sandisk125 - 07.08.2009

how can i make a thing,when player play my server, in the chat are a questions, and if someone write in the chat the correct answer, they recieve money.


how can i do that?


Re: how can i make an questions on my server? - WrathOfGenesis - 07.08.2009

Create a function that randomises a question then answers it, save the answer to a variable and check for that under OnPlayerText


Re: how can i make an questions on my server? - sandisk125 - 07.08.2009

how can i do that?


Re: how can i make an questions on my server? - WrathOfGenesis - 07.08.2009

Just told you. Convert what i told you into a script. Ill give you an example.

random number 1 = 8
random number 2 = 5

Send everyone a message: First to add 8 and 5 wins.

Save 8 + 5 to a variable ( Im going to use QuestionAnswer as an example )

onplayertext: If ( strval ( text ) == QuestionAnswer )

The player wins! Give him money, a minigun, your rcon password, whatever you feel like


Re: how can i make an questions on my server? - sandisk125 - 07.08.2009

how can i save 8+5 as variable?
what the hell is variable?


Re: how can i make an questions on my server? - Mowgli - 07.08.2009

do you mean qusetion, like a event?

and a variable i somthing that holds information... this might tell ya: http://en.wikipedia.org/wiki/Variable_(programming)


Re: how can i make an questions on my server? - sandisk125 - 07.08.2009

Quote:
Originally Posted by WrathOfGenesis
Just told you. Convert what i told you into a script. Ill give you an example.

random number 1 = 8
random number 2 = 5

Send everyone a message: First to add 8 and 5 wins.

Save 8 + 5 to a variable ( Im going to use QuestionAnswer as an example )

onplayertext: If ( strval ( text ) == QuestionAnswer )

The player wins! Give him money, a minigun, your rcon password, whatever you feel like
i am don't understand you yet, where i need to type it all?
say to me for example: type thegta under onplayercommand text,somethings like that.