VehicleClient

disableVehicleWeapon

DISABLE_VEHICLE_WEAPON0xF4FC6A6F67D8D856

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

SignatureJavaScript
disableVehicleWeapon(
  disabled: boolean,
  weaponHash: Hash,
  vehicle: Vehicle,
  owner: Ped
): void
SignatureLua
disableVehicleWeapon(
  disabled: boolean,
  weaponHash: Hash,
  vehicle: Vehicle,
  owner: Ped
)

Usage

JavaScript
disableVehicleWeapon(disabled, weaponHash, vehicle, owner);
Lua
disableVehicleWeapon(disabled, weaponHash, vehicle, owner)

Parameters

ParameterTypeJavaScriptLua
disabledBOOLbooleanboolean
weaponHashHashnumberinteger
vehicleVehiclenumberinteger
ownerPednumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json

Reference

Namespace
Vehicle VEHICLE
In the game
void DISABLE_VEHICLE_WEAPON(BOOL disabled, Hash weaponHash, Vehicle vehicle, Ped owner)
Hash
0xF4FC6A6F67D8D856

Open in the interactive natives reference