Random Negative Money
#1

Hi I have a command which I want to give minus 1000 to minus 5500 dollars. I have tried copying normal random money for positive scripts but it just ends up giving me like 99999999999 dollars. I don't understand why negative money doesn't work.

Anyone?
Reply
#2

its because the random function returns 0 to n-1 as random amount, it takes positive integers only. to care for the negativity, is your job:
pawn Код:
new takeaway=-(1000+random(4500));
watch the simple - char infront of the formula
Reply
#3

Thank you!

I understand!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)