This plugin adds a test on the first connection of your players,
you can populate it with the questions you want very easily !
This can be very useful if you have a RolePlay server and you want to make sure that all your players know how to play correctly.
Features
UI on first connection that displays a form with a defined number of questions
Add your own questions
Add your own minimum score to pass the test (currently 8/10)
Dependencies
es_freeroam
Installation
download/clone the repository into your server
change the values in the config file to match you server credentials
execute the sql.sql file in your database
[IMPORTANT] rename folder “antirpquestion”
add “- antirpquestion” in the citmp-server.yml
Enjoy !
Add you questions
Go to html/questions.js
Add your questions like so:
{question : "your question here",
propositionA : "Choice A",
propositionB : "Choice B",
propositionC : "Choice C",
propositionD : "Choice D",
reponse : "B"}, // here put the correct answer
In html/scripts.js you can modify the following variables:
var nbQuestionToAnswer = 10; // Number of questions to answer
var nbAnswerNeeded = 8; // Number of right answers to pass the test
var nbPossibleQuestions = 15; //number of questions in questions.js
You can also modify the logo in html/logo.png
Feel free to add your questions and modify the text (html/ui.html)
EDIT : Fixed, my bad, just forgot to rename folder to “antirpquestion”, I think you need to rename your github, I usually remove just “-master”
Little suggestion, if test is success player need to enter in a textbox age, size, birthdate, …
@Firewall Yeah i know but the name of the file is “question_rp” on GitHub but the name need to be “antirpquestion”, for people who usually just remove “-master”, the script will not work
2017-06-05 16:55:08.4065|WARN|CitizenMP.Server|A client tried to send an event of type antirpquestion:didQuestion, but it was not greenlit for client invocation. You may need to call RegisterServerEvent from your script.