createMoneyPickups
CREATE_MONEY_PICKUPS0x0589B5E791CE9B2BThe GTA V native CREATE_MONEY_PICKUPS of the OBJECT namespace, as LS:MP client scripts call it: the global function createMoneyPickups, in JavaScript and in Lua.
createMoneyPickups(
x: number,
y: number,
z: number,
value: number,
amount: number,
model: Hash
): voidcreateMoneyPickups(
x: number,
y: number,
z: number,
value: integer,
amount: integer,
model: Hash
)Usage
JavaScript
createMoneyPickups(x, y, z, value, amount, model);Lua
createMoneyPickups(x, y, z, value, amount, model)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
createMoneyPickups(pos, value, amount, model);Lua · with vectors
createMoneyPickups(pos, value, amount, model)Parameters
| Parameter | Type | JavaScript | Lua | Description |
|---|---|---|---|---|
x | float | number | number | The X-component of the world position to spawn the money pickups at. |
y | float | number | number | The Y-component of the world position to spawn the money pickups at. |
z | float | number | number | The Z-component of the world position to spawn the money pickups at. |
value | int | number | integer | The combined value of the pickups (in dollars). |
amount | int | number | integer | The number of pickups to spawn. |
model | Hash | number | integer | The model to use, or 0 for default money model. |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Spawns one or more money pickups.
Example:
createMoneyPickups(x, y, z, 1000, 3, 0x684a97ae);Spawns 3 spray cans that'll collectively give $1000 when picked up. (Three spray cans, each giving $334, $334, $332 = $1000).
Max is 2000 in MP. So if you put the amount to 20, but the value to $400,000 eg. They will only be able to pickup 20 - $2,000 bags. So, $40,000
Reference
- Namespace
- Object OBJECT
- In the game
void CREATE_MONEY_PICKUPS(float x, float y, float z, int value, int amount, Hash model)- Hash
0x0589B5E791CE9B2B