VehicleClient

findHandlerVehicleContainerIsAttachedTo

FIND_HANDLER_VEHICLE_CONTAINER_IS_ATTACHED_TO0x375E7FC44F21C8AB

The GTA V native FIND_HANDLER_VEHICLE_CONTAINER_IS_ATTACHED_TO of the VEHICLE namespace, as LS:MP client scripts call it: the global function findHandlerVehicleContainerIsAttachedTo, in JavaScript and in Lua.

SignatureJavaScript
findHandlerVehicleContainerIsAttachedTo(entity: Entity): Vehicle
SignatureLua
findHandlerVehicleContainerIsAttachedTo(entity: Entity): Vehicle

Usage

JavaScript
const vehicle = findHandlerVehicleContainerIsAttachedTo(entity);
Lua
local vehicle = findHandlerVehicleContainerIsAttachedTo(entity)

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger

Returns

Vehicle JavaScript number, Lua integer

Game handle of a vehicle. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Finds the vehicle that is carrying this entity with a handler frame.
The model of the entity must be prop_contr_03b_ld or the function will return 0.

Reference

Namespace
Vehicle VEHICLE
In the game
Vehicle FIND_HANDLER_VEHICLE_CONTAINER_IS_ATTACHED_TO(Entity entity)
Hash
0x375E7FC44F21C8AB
Formerly
_GET_VEHICLE_ATTACHED_TO_ENTITY _FIND_VEHICLE_CARRYING_THIS_ENTITY

Open in the interactive natives reference