random moneyrush amount
#1

hi

i want that it gives me a random (predefined) money amount as soon as i pickup the moneybag
but i dont get any money, why??

pawn Код:
new const RandomMoneyRushAmount[25][1] =
{
    {50000},{75000},{25000},{30000},{200000},{500000},{500},{1},{1000000},{10000},{150000},{350000},{10},{15000},{23512},{0},{16},{225000},{18},{95000},{80000},{31},{55000},{77500},{450000}

};

//OnPlayerPickUpPickUp
new rmra = random(sizeof RandomMoneyRushAmount);
if(pickupid == moneybag) GivePlayerMoney(playerid,RandomMoneyRushAmount[rmra][0]);
regards...
Reply
#2

that isnt the problem:
it just gave me the random money amount, but this pickup mixes up with some other pickups and i dont know why.
this is how i defined the pickup, but it mixes up with antoher pickup (an info sign)

pawn Код:
//OnPlayerEnterCheckpoint
moneybag = CreateDynamicPickup(1550,2,x,y,z,0);

//OnPlayerPickupPickup
if(pickupid == moneybag) GivePlayerMoney(playerid,2000);

//info sign pickup
CreateDynamicPickup(1239,1,-2280.8867,-1659.8271,483.0706);
why does this mix up? the pickups are defined?
Reply
#3

Try this.
pawn Код:
if(pickupid == moneybag)
{
     GivePlayerMoney(playerid,2000);
     return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)