08.05.2018, 12:26
you can use pseudorandom for it.
e.g. let's say you want someone to have 15% chance to be successful in *put action name here*
Direct SAMP wiki to figure other functions you need out yourself.
e.g. let's say you want someone to have 15% chance to be successful in *put action name here*
Код:
new chance = random(100) //Random number (from 0 to 99) if(chance <= 14) //15% chance of success { ... //Do your actions here upon success } else { ... //Do your actions here upon failure }