PedClient

setPedMoney

SET_PED_MONEY0xA9C8960E8684C1B5

The GTA V native SET_PED_MONEY of the PED namespace, as LS:MP client scripts call it: the global function setPedMoney, in JavaScript and in Lua.

SignatureJavaScript
setPedMoney(ped: Ped, amount: number): void
SignatureLua
setPedMoney(ped: Ped, amount: integer)

Usage

JavaScript
setPedMoney(ped, amount);
Lua
setPedMoney(ped, amount)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
amountintnumberinteger

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.

Maximum possible amount of money on MP is 2000. ~JX


Maximum amount that a ped can theoretically have is 65535 (0xFFFF) since the amount is stored as an unsigned short (uint16_t) value.

Reference

Namespace
Ped PED
In the game
void SET_PED_MONEY(Ped ped, int amount)
Hash
0xA9C8960E8684C1B5

Open in the interactive natives reference