Random pay
#1

Hey all !

I'm having a mini mission system I want it should give money random between example 1000 - 5000

Now im using
Quote:

new money = random(2500);

Reply
#2

Код:
new money = random(4000); // maximum amount - minimum amount
money = money + 1000; // minimum amount
Reply
#3

Quote:
Originally Posted by Deji
Код:
new money = random(4000); // maximum amount - minimum amount
money = money + 1000; // minimum amount
So this pays between 4000 and 1000 or ?
Reply
#4

Quote:
Originally Posted by ArTisT
Quote:
Originally Posted by Deji
Код:
new money = random(4000); // maximum amount - minimum amount
money = money + 1000; // minimum amount
So this pays between 4000 and 1000 or ?
no, from 1000 till 4999

pawn Код:
/* credits to ******. */
stock randomEx(minnum = cellmin, maxnum = cellmax) return random(maxnum - minnum + 1) + minnum;
so you only need to do

pawn Код:
new number = randomEx(1000, 4000);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)