setPedMoney
SET_PED_MONEY0xA9C8960E8684C1B5The 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.
setPedMoney(ped: Ped, amount: number): voidsetPedMoney(ped: Ped, amount: integer)Usage
JavaScript
setPedMoney(ped, amount);Lua
setPedMoney(ped, amount)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
amount | int | number | integer |
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