GET_VEHICLE_TRAILER_VEHICLE
Gets the trailer of a vehicle and puts it into the trailer parameter.
Hash
0xCF867A239EC30741Runtime name
GetVehicleTrailerVehicleNamespaceVEHICLE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x1CDD6BADC297830DSignature
BOOL GET_VEHICLE_TRAILER_VEHICLE(Vehicle vehicle, Vehicle* trailer);Parameters
| Name | Type | Description |
|---|---|---|
vehicle | Vehicle | — |
trailer | Vehicle* | — |
Returns BOOL
Description
Gets the trailer of a vehicle and puts it into the trailer parameter.
Usage
local retval, trailer = GetVehicleTrailerVehicle(vehicle, trailer)
-- always works, by hash
local retval, trailer = Citizen.InvokeNative(0xCF867A239EC30741, vehicle, Citizen.PointerValueIntInitialized(trailer), Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, trailer] = GetVehicleTrailerVehicle(vehicle, trailer);
// by hash
const [retval, trailer] = Citizen.invokeNative('0xCF867A239EC30741', vehicle, Citizen.pointerValueIntInitialized(trailer), Citizen.returnResultAnyway());var trailer = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xCF867A239EC30741, vehicle, trailer);
// trailer.GetResult<int>()- The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.