SA-MP Forums Archive
Random chances - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Random chances (/showthread.php?tid=408879)



Random chances - mailu - 19.01.2013

Hello buddies

Can someone help me? I wonder how can I make that when you attempt a robbery your chances to succes are random
I already made the robbery system but I just want know how to do that thing about random chances
Thanks


Re: Random chances - Infinity90 - 19.01.2013

pawn Код:
new change = Random(1);
switch(change)
{
case 1:
{
//Success
}
case 2:
{
//Failure
}
}