OnClientTrailerDetach: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (No player attribute clienside) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
==Example== | ==Example== | ||
This example outputs to the player that's towing the trailer that "The vehicle is now detached". (TESTED!) | |||
<syntaxhighlight lang="lua">addEventHandler("onClientTrailerDetach",root,function(towedBy) | <syntaxhighlight lang="lua">addEventHandler("onClientTrailerDetach",root,function(towedBy) | ||
player = getVehicleOccupant(towedBy,0) | player = getVehicleOccupant(towedBy,0) | ||
outputChatBox("The vehicle is now detached." | outputChatBox("The vehicle is now detached.") | ||
end)</syntaxhighlight> | end)</syntaxhighlight> | ||
Line 23: | Line 24: | ||
===Client event functions=== | ===Client event functions=== | ||
{{Client_event_functions}} | {{Client_event_functions}} | ||
[[es:onClientTrailerDetach]] |
Latest revision as of 19:41, 11 June 2025
This event is triggered when a trailer gets detached from its towing vehicle.
Parameters
vehicle towedBy
- towedBy: the vehicle that was towing the trailer.
Source
The source of this event is the trailer that is now detached.
Example
This example outputs to the player that's towing the trailer that "The vehicle is now detached". (TESTED!)
addEventHandler("onClientTrailerDetach",root,function(towedBy) player = getVehicleOccupant(towedBy,0) outputChatBox("The vehicle is now detached.") end)
See Also
Client vehicle events
- onClientTrailerAttach
- onClientTrailerDetach
- onClientVehicleCollision
- onClientVehicleDamage
- onClientVehicleEnter
- onClientVehicleExit
- onClientVehicleExplode
- onClientVehicleNitroStateChange
- onClientVehicleRespawn
- onClientVehicleStartEnter
- onClientVehicleStartExit
- onClientVehicleWeaponHit