random money
#1

How to give random money to player..
Reply
#2

pawn Код:
new cash = random(2000);
GivePlayerMoney(playerid, cash);
Gives player money between 1 and 2000
Reply
#3

Can I ask something about the random.
If I want to make a chance command, how I can do it randomly ( cash, kill, random teleport) and add
pawn Код:
new cash = random(2000);
GivePlayerMoney(playerid, cash);
you said ofc
Reply
#4

pawn Код:
switch(random(3))
{
    case 0:
    {
        new cash = random(2000);
        GivePlayerMoney(playerid, cash);
        return 1;
    }
    case 1:
    {
        SetPlayerHealth(playerid,0);
        return 1;
    }
    case 2:
    {
        new x = -8000 + random(16000);
        new y = -8000 + random(16000);
        SetPlayerPosFindZ(playerid, x, y, 200.0);
        return 1;
    }
}
Didn't test it.
Reply
#5

Thank you AeroBlast
it works fine!
Reply
#6

You could also do something like:

Код:
new cash = random(40-100);
	  GivePlayerMoney(playerid, cash);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)