Money lying in the world (fl_money): holds an amount of one currency and hands it to the
player who uses it (Currencies:pickup_money), unless the CanPlayerPickupMoney or the
PlayerPickupMoney hook prevents that. It is created by Currencies:spawn_money, which is
what Entity:drop_money puts the money of a player into the world with. While the
save_dropped_money config is on, the Currencies plugin saves these entities and puts them
back when the map is loaded again; a pickup marks the saved money as out of date, so that
the next data save writes what is left.
Summary
Methods
Currencies:pickup_money and removes the entity.Methods
Draws the entity's model.
ENT:DrawTargetID(x, y, distance)
client plugins/currencies/plugin/entities/entities/fl_money.lua:103Draws the currency name and amount when the local player looks at the entity, fading out with distance.
Parameters
- x Number
- y Number
- distance Number distance between the local player and the entity
Returns the currency this money entity holds.
Returns
- String currency ID, or nil if it has not been set
Returns how much money this entity holds.
Returns
- Number amount, or nil if it has not been set
Sets up physics, use type and collision group, and wakes the physics object.
Sets the currency this money entity holds. Server only.
Parameters
- value String currency ID
Sets how much money this entity holds. Server only.
Parameters
- value Number
ENT:Use(activator, _caller, _use_type, _value)
server plugins/currencies/plugin/entities/entities/fl_money.lua:68Lets the activator pick the money up: asks the CanPlayerPickupMoney and the
PlayerPickupMoney hooks, gives the money to the activator with
Currencies:pickup_money and removes the entity. Only players pick money up, and money
that is being removed cannot be picked up again. The entity stays if either hook
returns false or if the money is refused, as it is when the AdjustReceivedMoney hook
refuses it.
Parameters
- activator Entity
- _caller Entity
- _use_type Number USE_* enum
- _value Number