Dropping Money
#3

On top of your script:
Код:
new cash_pickup;
On your OnPlayerDeath:
Код:
if(GetPlayerMoney(playerid) > 3000) { // Player that died has more than 3000$ 
GivePlayerMoney(playerid, -3000); // Take 3000 from their money.
new Float:x, Float:y, Float:z; // A place to store the place to create the pickup
GetPlayerPos(playerid, x,y,z); // Get their x,y and z to create the pickup on
cash_pickup = CreatePickup(1212, 5, x,y,z, -1); // Creates a pickup on the location where the player died. this 
pickup will disappear after some time
On your OnPlayerPickUpPickup:
Код:
if(pickupid == cash_pickup) {
GivePlayerMoney(playerid, 3000); // note: all players can pickup this pickup. Other players can take your cash reward.
}
Not tested.
Reply


Messages In This Thread
Dropping Money - by ChuckyBabe - 16.04.2014, 01:46
Re: Dropping Money - by DobbysGamertag - 16.04.2014, 02:17
Re: Dropping Money - by EpicDutchie - 16.04.2014, 08:43
Re: Dropping Money - by ChuckyBabe - 17.04.2014, 05:15
Re: Dropping Money - by Dignity - 17.04.2014, 05:27
Re: Dropping Money - by RajatPawar - 17.04.2014, 05:44

Forum Jump:


Users browsing this thread: 1 Guest(s)