createModelSwap
CREATE_MODEL_SWAP0x92C47782FDA8B2A3The GTA V native CREATE_MODEL_SWAP of the ENTITY namespace, as LS:MP client scripts call it: the global function createModelSwap, in JavaScript and in Lua.
createModelSwap(
x: number,
y: number,
z: number,
radius: number,
originalModel: Hash,
newModel: Hash,
p6: boolean
): voidcreateModelSwap(
x: number,
y: number,
z: number,
radius: number,
originalModel: Hash,
newModel: Hash,
p6: boolean
)Usage
JavaScript
createModelSwap(x, y, z, radius, originalModel, newModel, p6);Lua
createModelSwap(x, y, z, radius, originalModel, newModel, p6)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
createModelSwap(pos, radius, originalModel, newModel, p6);Lua · with vectors
createModelSwap(pos, radius, originalModel, newModel, p6)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
radius | float | number | number |
originalModel | Hash | number | integer |
newModel | Hash | number | integer |
p6 | BOOL | boolean | boolean |
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.
Only works with objects!
Reference
- Namespace
- Entity ENTITY
- In the game
void CREATE_MODEL_SWAP(float x, float y, float z, float radius, Hash originalModel, Hash newModel, BOOL p6)- Hash
0x92C47782FDA8B2A3