CreateScriptVehicleGenerator
Docslocal retval = CreateScriptVehicleGenerator(x, y, z, heading, p4, p5, modelHash, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16)Description
Creates a script vehicle generator at the given coordinates. Most parameters after the model hash are unknown.
Parameters:
a/w/s - Generator position
heading - Generator heading
p4 - Unknown (always 5.0)
p5 - Unknown (always 3.0)
modelHash - Vehicle model hash
p7/8/9/10 - Unknown (always -1)
p11 - Unknown (usually TRUE, only one instance of FALSE)
p12/13 - Unknown (always FALSE)
p14 - Unknown (usally FALSE, only two instances of TRUE)
p15 - Unknown (always TRUE)
p16 - Unknown (always -1)
Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 0); CREATE_SCRIPT_VEHICLE_GENERATOR(coords.x, coords.y, coords.z, 1.0f, 5.0f, 3.0f, GET_HASH_KEY("adder"), -1. -1, -1, -1, -1, true, false, false, false, true, -1);
Parameters
| Name | Type | Description |
|---|---|---|
x | float | — |
y | float | — |
z | float | — |
heading | float | — |
p4 | float | — |
p5 | float | — |
modelHash | Hash | — |
p7 | int | — |
p8 | int | — |
p9 | int | — |
p10 | int | — |
p11 | BOOL | — |
p12 | BOOL | — |
p13 | BOOL | — |
p14 | BOOL | — |
p15 | BOOL | — |
p16 | int | — |
Quick Snippet: Get Coordinatesxyzheading
xyzheadingAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Quick Snippet: Load Model HashmodelHash
modelHashModels must be loaded before use. This snippet handles requesting and releasing properly.
-- Properly load a model before spawning/using it
local modelName = "prop_barrel_01a" -- change to your model
local modelHash = GetHashKey(modelName)
RequestModel(modelHash)
while not HasModelLoaded(modelHash) do
Wait(0)
end
print("Model loaded: " .. modelName .. " (" .. modelHash .. ")")
-- Release when done:
-- SetModelAsNoLongerNeeded(modelHash)Vehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
intReturns an integer value.