need a little help with random - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: need a little help with random (
/showthread.php?tid=140475)
need a little help with random -
FujiNNN - 09.04.2010
i got this one..:
pawn Код:
new randpaycheck = 380 + random(680);
but how do i change the random to like.. from 380 to 680 and not 380 plus 680?...
thank you..
ohh and one more thing...
if object destroyed like if object destroyed it will recover it in 10 sec
is it possable?.. thanks again...
Re: need a little help with random -
cessil - 09.04.2010
Код:
new randpaycheck = 380 + random(680);
if(randpaycheck <= 380) randpaycheck = randpaycheck + 380;
Re: need a little help with random -
FujiNNN - 09.04.2010
Quote:
Originally Posted by cessil
Код:
new randpaycheck = 380 + random(680);
if(randpaycheck <= 380) randpaycheck = randpaycheck + 380;
|
there isnt like.. mm.. new randpaycheck = random(380
- 680);
something from 1 number to the other number... (between)
Re: need a little help with random -
M4S7ERMIND - 09.04.2010
if you want random value between 380 and 680, this would do it:
new randpaycheck = random(301)+380;
Re: need a little help with random -
FujiNNN - 09.04.2010
ok spasibo..