> For the complete documentation index, see [llms.txt](https://docs.frozen-scripts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frozen-scripts.com/scripts/helicopter-camera/events.md).

# Events

There are 2 events intended to be used by external scripts, these are `helicam:enteredCamera` and `helicam:leftCamera`. Both events are fired on the client that opens the camera.\
\
Both events have 1 parameter, `netId` which is the network id of the helicopter. These events can for example be used to toggle the hud.

## Examples

```lua
AddEventHandler('helicam:enteredCamera', function(netId)
    print("Local player entered camera of helicopter with network id: "..tostring(netId))
end)

AddEventHandler('helicam:leftCamera', function(netId)
    print("Local player left camera of helicopter with network id: "..tostring(netId))
end)
```
