28.03.2014, 13:43
This is for a player to pick up
OnPlayerPickUpPickup.
Or if you want to give people cash
OnPlayerSpawn
OnPlayerPickUpPickup.
Код:
if(pickupid == your_pickup) { new str[44]; new randmoney = random(100001) - 50000; format(str, sizeof(str), " >> Player picked up %s and recieved $%d", your_pickup, randmoney); SendClientMessage(playerid, 0xffffffff, str); GivePlayerMoney(playerid, randmoney); }
OnPlayerSpawn
Код:
GivePlayerMoney(playerid,random(100000-50000)+50000);