/robbank 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /robbank help (
/showthread.php?tid=276736)
/robbank help -
Tanush123 - 15.08.2011
if players use /robbank how can i make they get random money around 10000-20000
Re: /robbank help -
omer5198 - 15.08.2011
i think that should work...
Quote:
GivePlayerMoney(playerid, 10000+rand(10000));
|
Re: /robbank help -
Tanush123 - 15.08.2011
i put
GivePlayerMoney(playerid, 10000+randomcash(10000));
then i put new randomcash; and i got lota warning from that line
pawn Код:
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(5020) : error 012: invalid function call, not a valid address
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(5020) : warning 215: expression has no effect
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(5020) : error 001: expected token: ";", but found ")"
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(5020) : error 029: invalid expression, assumed zero
D:\Users\Tanush\Desktop\SA-MP Server Stunt\gamemodes\stunt.pwn(5020) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Re: /robbank help -
Darnell - 15.08.2011
pawn Код:
new randmoney = random(10000) - 20000;
GivePlayerMoney(playerid, randmoney);
Try this.
Re: /robbank help -
Tanush123 - 15.08.2011
damn man im getting negative xD how i fix that
Re: /robbank help -
Setkus - 15.08.2011
new randmoney = random(10000) + 20000;
GivePlayerMoney(playerid, randmoney);
Try this, but im not sure.
Re: /robbank help -
Tanush123 - 15.08.2011
people getting over 20000 !
Re: /robbank help -
grand.Theft.Otto - 15.08.2011
pawn Код:
new robmoney = random(20000);
GivePlayerMoney(playerid, robmoney);
20k will be the max. Not sure how to do minimum and max, but I think it is this:
pawn Код:
new robmoney = 10000 + random(20000);
GivePlayerMoney(playerid, robmoney);
Try it, but the first code will give ANYTHING between $0 to $20,000.
Re: /robbank help -
Tanush123 - 15.08.2011
well who cares ill use the 0-20k one
Re: /robbank help -
=WoR=Varth - 16.08.2011
pawn Код:
GivePlayerMoney(playerid,10000+random(10000)); 10000-20000