Random Value Help - 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 Value Help (
/showthread.php?tid=513040)
Random Value Help -
AroseKhanNiazi - 14.05.2014
How can i do that the random amount multiply by 2
Код:
random(100000(500000))*2;
Код:
random(100000(500000)*2);
this both won't work
Re: Random Value Help -
Mriss - 14.05.2014
Why not just double the digits urself instead as you have already defined the value anyways try this(Not sure if works):
pawn Код:
random(100000*2(500000));
Re: Random Value Help -
AroseKhanNiazi - 14.05.2014
but the limit here will not let me do it 500000 is limit
Re: Random Value Help -
Vince - 14.05.2014
Still unsure about what values you actually expect from the
random function ... Do you want values between 100k and 500k? Or what? You're very unclear.
Re: Random Value Help -
AroseKhanNiazi - 14.05.2014
yeah between 100k-500k but i don't know how to set lowest
Re: Random Value Help -
Konstantinos - 14.05.2014
pawn Код:
stock RandomEx(min, max) // By ******
{
return random(max - min) + min;
}
and you can use it as:
Re: Random Value Help -
AroseKhanNiazi - 14.05.2014
thanks once more