NetworkClient

networkExplodeVehicle

NETWORK_EXPLODE_VEHICLE0x301A42153C9AD707

The GTA V native NETWORK_EXPLODE_VEHICLE of the NETWORK namespace, as LS:MP client scripts call it: the global function networkExplodeVehicle, in JavaScript and in Lua.

SignatureJavaScript
networkExplodeVehicle(
  vehicle: Vehicle,
  isAudible: boolean,
  isInvisible: boolean,
  netId: number
): boolean
SignatureLua
networkExplodeVehicle(
  vehicle: Vehicle,
  isAudible: boolean,
  isInvisible: boolean,
  netId: integer
): boolean

Usage

JavaScript
const result = networkExplodeVehicle(vehicle, isAudible, isInvisible, netId);
Lua
local result = networkExplodeVehicle(vehicle, isAudible, isInvisible, netId)

Parameters

ParameterTypeJavaScriptLua
vehicleVehiclenumberinteger
isAudibleBOOLbooleanboolean
isInvisibleBOOLbooleanboolean
netIdintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

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

In the console script dumps, this is only referenced once.

networkExplodeVehicle(vehicle, 1, 0, 0);

^^^^^ That must be PC script dumps? In X360 Script Dumps it is reference a few times with 2 differences in the parameters.
Which as you see below is 1, 0, 0 + 1, 1, 0 + 1, 0, and a *param?

am_plane_takedown.c

network_explode_vehicle(net_to_veh(Local_40.imm_2), 1, 1, 0);

armenian2.c

network_explode_vehicle(Local_80[6 <2>], 1, 0, 0);

fm_horde_controler.c

network_explode_vehicle(net_to_veh(*uParam0), 1, 0, *uParam0);

fm_mission_controller.c, has 6 hits so not going to list them.

Side note, setting the first parameter to 0 seems to mute sound or so?

Seems it's like addExplosion, etc. the first 2 params. The 3rd atm no need to worry since it always seems to be 0.

Reference

Namespace
Network NETWORK
In the game
BOOL NETWORK_EXPLODE_VEHICLE(Vehicle vehicle, BOOL isAudible, BOOL isInvisible, int netId)
Hash
0x301A42153C9AD707

Open in the interactive natives reference