Chance!
#2

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*
Код:
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
}
Direct SAMP wiki to figure other functions you need out yourself.
Reply


Messages In This Thread
Chance! - by Thanks - 08.05.2018, 12:20
Re: Chance! - by Maxandmov - 08.05.2018, 12:26
Re: Chance! - by Thanks - 08.05.2018, 12:59
Re: Chance! - by TadePoleMG - 08.05.2018, 13:06
Re: Chance! - by CrystalGamer - 08.05.2018, 15:31
Re: Chance! - by kovac - 08.05.2018, 15:36
Re: Chance! - by CrystalGamer - 08.05.2018, 15:46
Re: Chance! - by kovac - 08.05.2018, 16:12
Re: Chance! - by Logic_ - 08.05.2018, 17:48
Re: Chance! - by Thanks - 08.05.2018, 18:20

Forum Jump:


Users browsing this thread: 1 Guest(s)