isVehicleLocked
Shared
Returns whether a vehicle's doors are locked.
bool isVehicleLocked(vehicle vehicle)
Parameters
| Name | Type | Description |
|---|---|---|
| vehicle | vehicle | The vehicle. |
Returns
true if it is locked. false if it is unlocked or the element is not a vehicle.
Example
addEventHandler("onVehicleStartEnter", root, function(ped, seat)
if isVehicleLocked(source) then
outputDebugString("someone tried a locked vehicle")
end
end)