[HELP] The /roll script, or how to random math on gmod

Hello everybody !
First of all, sorry for the potential mistakes and sorry for posting this thread, i know there were a few of them about the same subject, but advices were given, and i’m french ( studying english ) that’s why i have some issues with it, i don’t understand evrtything each time, so it is very hard for me to make the script work.

( ill try to explan what i want : )
I do have a DarkRP server, and i saw on a another i was playing on that a command exists, where you just have to write " /roll" in the chat, and it gives you ( randomly ) a number between 1 and 100 ( both included ), which will define if you won or not the rp action !

Here is a quick example :
A gangster aims a man with a gun, and says " GIVE ME YOUR MONEY !"
the man can try a /roll :

The man : /me try to catch the gun
the man : /roll
The man tried a roll and obtained randomly 64 on 100
The gangster : /me tries to resist
The gangster : /roll
**The man tried a roll and obtained randomy 41 on 100 ** <------- less than the other, so he loses the RP action and has to drop the gun

Can you please tell me what is the script or command to make to do this very cool thing that could be useful for RP ?
I really need your help on this, i’ve been searching for a while and didn’t understand because of the difficult terms, thanks a lot, Barbec.


(User was banned for this post ("Please see Developer Discussion for help threads!" - NiandraLades))