GetVehicleDeformationAtPos
Docslocal retval = GetVehicleDeformationAtPos(vehicle, offsetX, offsetY, offsetZ)Description
The only example I can find of this function in the scripts, is this:
struct _s = VEHICLE::GET_VEHICLE_DEFORMATION_AT_POS(rPtr((A_0) + 4), 1.21f, 6.15f, 0.3f);
-----------------------------------------------------------------------------------------------------------------------------------------
PC scripts:
v_5/*{3}*/ = VEHICLE::GET_VEHICLE_DEFORMATION_AT_POS(a_0._f1, 1.21, 6.15, 0.3);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | — |
offsetX | float | — |
offsetY | float | — |
offsetZ | float | — |
Quick Snippet: Get CoordinatesoffsetXoffsetYoffsetZ
offsetXoffsetYoffsetZAdd 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: Get Vehiclevehicle
vehicleUse this to get the current vehicle handle for this native.
-- Get the vehicle the player is currently in
local ped = PlayerPedId()
local vehicle = GetVehiclePedIsIn(ped, false)
if vehicle ~= 0 then
print("Vehicle handle: " .. vehicle)
print("Model: " .. GetEntityModel(vehicle))
else
print("Player is not in a vehicle")
endVehicle Models

adder
alpha
blade
ardent
asea
cogcabrio
baller
blistaReturns
Vector3Returns a 3D vector (x, y, z).