Exports
np_helicam has server exports and two client exports for HUD compatibility. The client modules are global tables inside the resource and are not exported.
Server
server
| Export | Returns | Description |
|---|---|---|
AddBolo(plate, reason?, code?) | boolean | Add or replace a BOLO. false for an invalid plate. reason defaults to 'BOLO' (max 64 chars), code max 12 chars |
RemoveBolo(plate) | boolean | false if there was no such BOLO |
IsBolo(plate) | boolean | true if the plate is in the registry or Config.Bolo.lookup reports a hit |
GetBolos() | table[] | Registry entries, newest first: { plate, reason, code, by, at } |
GetMissionReport(id) | table | nil | A finished mission report (the last 50 are kept). Same table as np_helicam:missionReport |
exports.np_helicam:AddBolo('46EEK572', 'Armed robbery', '10-32')
exports.np_helicam:IsBolo(' 46eek572 ') -- true: plates are normalised
exports.np_helicam:RemoveBolo('46EEK572')
for _, b in ipairs(exports.np_helicam:GetBolos()) do
print(b.plate, b.reason, b.code, b.by, os.date('%H:%M', b.at))
endPlates
Plates are normalised before every comparison: upper case, letters and digits only, at most 12 characters. A plate that is empty after that is invalid. by is 'export' for entries added through AddBolo, the callsign for /bolo, or 'console'. at is a Unix timestamp (os.time()).
The registry is in memory and holds at most 500 BOLOs (the oldest is dropped). reason and code are cleaned of formatting and markdown characters. The registry is empty after a resource or server restart, so add your BOLOs again on start, or use Config.Bolo.lookup to read them from your MDT. See Configuration → BOLO.
Mission reports
local report = exports.np_helicam:GetMissionReport('261004-2214-3')
if report then
print(report.text) -- plain-text report
print(report.meta.callsign, report.durationMs, report.distanceM)
endReport ids come from the np_helicam:missionReport event. See Events for the fields.
Client
client
| Export | Returns | Description |
|---|---|---|
IsFullscreen() | boolean | true while the camera or a live feed fills the screen. Same state as np_helicam:fullscreen |
IsMinimapHeld() | boolean | true while np_helicam has the minimap. Same state as np_helicam:contextMap |
Use them when your HUD starts after np_helicam and may have missed the events. To show a toast in np_helicam's style from the server, trigger np_helicam:notify.