Events
Helicopter Camera fires fz_helicam:enteredCamera and fz_helicam:leftCamera on the client, with the helicopter network id, for HUD toggles and more.
Helicopter Camera fires two client events that other scripts can listen to. They only fire on the client of the player opening or closing the camera:
| Event | When | Argument |
|---|---|---|
fz_helicam:enteredCamera | the player opens the camera | netId: network id of the helicopter |
fz_helicam:leftCamera | the player closes the camera | netId: network id of the helicopter |
A common use is hiding your HUD while the camera is open.
Example
lua
AddEventHandler('fz_helicam:enteredCamera', function(netId)
-- camera opened: hide the HUD
print(('Camera opened in helicopter %s'):format(netId))
end)
AddEventHandler('fz_helicam:leftCamera', function(netId)
-- camera closed: show the HUD again
print(('Camera closed in helicopter %s'):format(netId))
end)Still stuck?Ask on our Discord