[Include] drop-money.inc (Make player drop cash on death)
#1

Drop Money

View code and download: https://gist.github.com/AmirSavand/e...23d4dce90a8439

Leave comments here or on the GitHub page if you have any questions/suggestions.


Installation


Define DROP_MONEY_PICKUPS

This is the amount of cash pickups to create.
Recommended value is 5.


Define DROP_MONEY_AMOUNT

This is the amount of cash player gains from picking up each pickup.


Define MAX_DROP_MONEY

This is the maximum amount of money pickups allowed by this include.
Recommended value is 500 (if you are using streammer plugin).


Usage

Make sure to checkout the stock functions in the GitHub.

Call DropMoney() when you want to create money drops (like OnPlayerDeath).
Call DestroyDropMoney() if you want to destroy all the pickups (like OnFilterScriptExit)
Call CheckPlayerMoneyDropPickup() in OnPlayerPickupDynamicPickup() or anywhere else like pickup up cash with keys should be used in OnPlayerKeyStateChange() if you store last pickup id).

To prevent player to pick the cash pickups up use this PreventPlayerDropMoneyOnDeath() event and return 1.
If you want to know if a player dropped money on death, watch this event OnPlayerDropMoneyOnDeath().
Reply


Messages In This Thread
drop-money.inc (Make player drop cash on death) - by AmirSavand - 10.09.2018, 00:07
Re: drop-money.inc (Make player drop cash on death) - by Pottus - 10.09.2018, 00:32
Re: drop-money.inc (Make player drop cash on death) - by AmirSavand - 10.09.2018, 00:50
Re: drop-money.inc (Make player drop cash on death) - by Pottus - 10.09.2018, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)