getRandomVehicleModelInMemory
GET_RANDOM_VEHICLE_MODEL_IN_MEMORY0x055BF0AC0C34F4FDThe GTA V native GET_RANDOM_VEHICLE_MODEL_IN_MEMORY of the VEHICLE namespace, as LS:MP client scripts call it: the global function getRandomVehicleModelInMemory, in JavaScript and in Lua.
getRandomVehicleModelInMemory(p0: boolean): [
modelHash: Hash,
successIndicator: number
]getRandomVehicleModelInMemory(p0: boolean): Hash, integerUsage
JavaScript
const [modelHash, successIndicator] = getRandomVehicleModelInMemory(p0);Lua
local modelHash, successIndicator = getRandomVehicleModelInMemory(p0)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
p0 | BOOL | boolean | boolean |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | modelHash | Hash | number | integer | output |
| 2 | successIndicator | int | number | integer | output |
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Not present in the retail version! It's just a nullsub.
p0 always true (except in one case)
successIndicator: 0 if success, -1 if failed
Reference
- Namespace
- Vehicle VEHICLE
- In the game
void GET_RANDOM_VEHICLE_MODEL_IN_MEMORY(BOOL p0, Hash* modelHash, int* successIndicator)- Hash
0x055BF0AC0C34F4FD