Random Money
#1

Код:
//------------------------------------------------------------------------------
stock randomEx(min,max) {
	return (min+random(max));
}

stock randomExx(const iMin, const iMax) {
	return random(iMax - iMin) + iMin;
}
Код:
new novac = RandomEx(8000, 40001);
it should be random money between 8000 - 400001 ... but anyway it gives me 270 000 $

What's problem? Any Help
Reply
#2

#define RndEx(%0,%1) %0+random(%1-%0)
PlayerMoney[playerid]+=RndEx(8000,40000);
Reply
#3

Код:
#define RndEx(%0,%1) %0+random(%1-%0)
Код:
PljackaNovac[ playerid ] +=RndEx(8000,40000);
and it gives me 7 000 000 $ ...

its really wierd
Reply
#4

well, use this
PHP код:
stock randomEx(min,max)
{
    return 
min+random(max-min);

Reply
#5

https://sampforum.blast.hk/showthread.php?tid=305136
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)