random
#1

pawn Код:
new RobbedMoney = random(GetPlayerCash(playerid));
    printf("ROBBED: %i", RobbedMoney);
for example he haves 20000 but it prints 4120000 wtf?
Reply
#2

Show us your GetPlayerCash function.
Reply
#3

It returns money how much you have as i said he haves 20000
Fixed
Reply
#4

If you're using a 'decimal system' (i.e. $14.00) then GetPlayerCash returns a float.

You'll have to use
pawn Код:
new rand=random(floatround(GetPlayerCash(playerid)));
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)