[Random Amounts] - 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: [Random Amounts] (
/showthread.php?tid=83744)
[Random Amounts] -
Abernethy - 26.06.2009
I am working on a robbery system, so when you're at a certain point /stickup, yada, yada, yada..
The question is, how can I give the player a random amount of money between,
$100-$2500?
Re: [Random Amounts] -
Weirdosport - 26.06.2009
blahblah = random(2400) + 100;
Don't quote me on random(), might be rand for all I can remember at this time of night..
Re: [Random Amounts] -
Abernethy - 26.06.2009
Quote:
Originally Posted by Weirdosport
blahblah = random(2400) + 100;
Don't quote me on random(), might be rand for all I can remember at this time of night..
|
Doesn't work? ..
Anybody?
Re: [Random Amounts] -
Weirdosport - 26.06.2009
pawn Код:
#include <a_samp>
new bob;
public OnFilterScriptInit()
{
bob = random(2400) + 100;
printf("%i", bob);
return 1;
}
8 lines of code says it does..
Re: [Random Amounts] -
Abernethy - 26.06.2009
Sorry. Missed the 'new' at the top. I just woke up.

Thanks for your help mate.
Re: [Random Amounts] -
Weirdosport - 26.06.2009
No problem, I'm just about to un-wake-up.