Replay System
The Replay System allows you to review world events recorded autonomously, without requiring a player to actively monitor the camera. Recordings are triggered automatically when specific actions occur.
Default Trigger (Gunfire): By default, the system only detects shooting. If a player fires a weapon within the Field of View (FOV) of a replay-enabled camera, it will automatically record and save up to 30 seconds of footage to its memory.
Custom Triggers: You can use the
triggerReplay()export to manually activate the recording system on the nearest compatible camera. This will capture the movements and actions of all players and NPCs currently within its visual range.
You can trigger the export when a player completes a drug sale, allowing you to record the exact moment the transaction occurs and keep a visual record of it. Similarly, you can trigger a recording when a player uses a lockpick in your vehicle theft script, among many other possibilities.
local triggered = exports['av_cameras']:triggerReplay()
print(triggered)
-- It will return true if the script finds a nearby camera with the replay option enabled
-- and the player within its range.he replay system captures a detailed environment, tracking and recording the actions of all players, NPCs, and vehicles within its Field of View (FOV). Because of this rich data transfer from the server to the client, loading a replay for the first time may take approximately 10-15 seconds.
Once downloaded, the replay data is temporarily stored in the client's local cache. Subsequent viewings will load instantly without needing to re-download the data, provided the player does not disconnect or reconnect to the server (which clears the cache).
To access a camera's recorded videos and replays, simply select the Access Memory option.
Data Retention Policy: Please note that all videos and replays are automatically deleted from the server 7 days after they are recorded. This is done to conserve server storage space, which is especially important for the replay system, as every individual replay is saved as a .json file within the json directory.

Last updated