[Release] Roleplay Test (form) on first connection (06/05/2017)

What is this plugin ?

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)

link: antirpquestion

The text in the script is in french, sorry i’m a french baguette.
Thanks to @DiiiaZoTe for the help doing this script

13 Likes

Freddy.

You seem to be popping out many scripts of great use.

Im currently looking for a developer like yourself to help me with a server.

Care to inbox me? :slight_smile:

I’m working on my own server currently, sorry :confused:

1 Like

Prett neat Freddy! Been looking for a way to deal with uis, im a beginner myself an you just gave me and the rest of us the right tools! Thank you :smiley:

1 Like

no problem, it’s a pleasure :wink:

Okay so added to my server, with correct installation etc, But the commencer button does nothing? is this my fault?

It works very well on my server, I don’t see where’s the problem :confused:

You might want to change that

Same problem for me, button do nothing

EDIT : Fixed, my bad, just forgot to rename folder to “antirpquestion”, I think you need to rename your github, I usually remove just “-master” :wink:

Little suggestion, if test is success player need to enter in a textbox age, size, birthdate, … :slight_smile:

The -master is automatically added by Github

@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

1 Like

Add some screenshots :smiley:

the script not work for me to
impossible to press for start questionaire …

anyway thx for your share :wink:

Have you tried this ?

1 Like

Everything is woking well… There might not be any problem. By the way sorry it’s an English/French mix x)

work prefectly thx man :wink:

Just released an update to fix the progress bar not working.

1 Like

I have an error

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.

You probably changed something accidentally in the server.lua

Any ways to get this to work without es_freeroam?