ObjectClient

createMoneyPickups

CREATE_MONEY_PICKUPS0x0589B5E791CE9B2B

The 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.

SignatureJavaScript
createMoneyPickups(
  x: number,
  y: number,
  z: number,
  value: number,
  amount: number,
  model: Hash
): void
SignatureLua
createMoneyPickups(
  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

ParameterTypeJavaScriptLuaDescription
xfloatnumbernumberThe X-component of the world position to spawn the money pickups at.
yfloatnumbernumberThe Y-component of the world position to spawn the money pickups at.
zfloatnumbernumberThe Z-component of the world position to spawn the money pickups at.
valueintnumberintegerThe combined value of the pickups (in dollars).
amountintnumberintegerThe number of pickups to spawn.
modelHashnumberintegerThe 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

Open in the interactive natives reference