_0x51F30DB60626A20E
Docslocal retval = 0x51f30db60626a20e(vehicle, x, y, z, rotX, rotY, rotZ, p7, p8)Description
Usex in decompiled scripts in combination with <code>_GET_VEHICLE_SUSPENSION_BOUNDS</code>.
NativeDB Introduced: v1180
// Example from fm_bj_race_controller.c
if (!VEHICLE::_0x51F30DB60626A20E(uParam0->f_26, uParam0->f_12.f_3, uParam0->f_12, 2, 1) && !func_282(uParam0->f_6))
{
VEHICLE::_GET_VEHICLE_SUSPENSION_BOUNDS(*uParam0, &vVar15, &uVar16);
VEHICLE::_GET_VEHICLE_SUSPENSION_BOUNDS(uParam0->f_26, &vVar17, &uVar18);
fVar19 = SYSTEM::VDIST2(0f, 0f, vVar15.z, 0f, 0f, vVar17.z);
uParam0->f_12.f_3.f_2 = (uParam0->f_12.f_3.f_2 + fVar19);
if (!VEHICLE::_0x51F30DB60626A20E(uParam0->f_26, uParam0->f_12.f_3, uParam0->f_12, 2, 1))
{
uParam0->f_12.f_3 = { uParam0->f_6 };
uParam0->f_12 = { uParam0->f_9 };
}
}Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | the target vehicle |
x | float | vehicle location |
y | float | vehicle location |
z | float | vehicle location |
rotX | float | some kind of vehicle rotation value |
rotY | float | some kind of vehicle rotation value |
rotZ | float | some kind of vehicle rotation value |
p7 | int | usually 2 |
p8 | Any | usually 1 |
Quick Snippet: Get CoordinatesxyzrotX
xyzrotXAdd 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
BOOLReturns TRUE (1) or FALSE (0).