# 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)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.frozen-scripts.com/scripts/helicopter-camera/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
