OnClientVehicleWeaponHit
Jump to navigation
Jump to search
This event is called when a vehicle weapon hits an element.
Parameters
bool leftFoot
- weaponType: The type of vehicle weapon. (See the list below)
- hitElement: The vehicle, ped or player that was hit by the weapon sometimes false.
- hitX: The X world co-ordinate of where the hit occured.
- hitY: The Y world co-ordinate of where the hit occured.
- hitZ: The Z world co-ordinate of where the hit occured.
- model: The model ID of the element that was hit.
- materialID: The material ID of the element that was hit.
Weapon types
- 0: Invalid
- 1: Water Canon
- 2: Tank Gun - Doesn't seem to trigger for Rhino.
- 3: Rocket - Doesn't seem to trigger with Hydra or Hunter.
- 4: Heat Seeking Rocket - Doesn't seem to trigger with Hydra.
Source
The source of this event is the vehicle that fired the weapon.
Requirements
This template will be deleted.
Example
addEventHandler("onClientVehicleWeaponHit", root, function(weaponType, hitElement, hitX, hitY, hitZ, model, materialID) outputChatBox(tostring(weaponType).." "..tostring(hitElement).." "..tostring(hitX) end )
</section>
See Also
Client vehicle events
- onClientTrailerAttach
- onClientTrailerDetach
- onClientVehicleCollision
- onClientVehicleDamage
- onClientVehicleEnter
- onClientVehicleExit
- onClientVehicleExplode
- onClientVehicleNitroStateChange
- onClientVehicleRespawn
- onClientVehicleStartEnter
- onClientVehicleStartExit
- onClientVehicleWeaponHit
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled