10.09.2018, 00:07
(
Last edited by AmirSavand; 13/10/2018 at 08:27 AM.
)
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().
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().