/robbank help
#1

if players use /robbank how can i make they get random money around 10000-20000
Reply
#2

i think that should work...
Quote:

GivePlayerMoney(playerid, 10000+rand(10000));

Reply
#3

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.
Reply
#4

pawn Код:
new randmoney = random(10000) - 20000;
  GivePlayerMoney(playerid, randmoney);
Try this.
Reply
#5

damn man im getting negative xD how i fix that
Reply
#6

new randmoney = random(10000) + 20000;
GivePlayerMoney(playerid, randmoney);

Try this, but im not sure.
Reply
#7

people getting over 20000 !
Reply
#8

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.
Reply
#9

well who cares ill use the 0-20k one
Reply
#10

pawn Код:
GivePlayerMoney(playerid,10000+random(10000)); 10000-20000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)