A CCTV script that can be viewed externally

Hey all, i was wondering if this exists or could be created.

A CCTV script with preset cameras that can be controlled and viewed from outside of the game, ideally only to people who have certain access to them, like dispatchers or even have some traffic cameras that can be accessed by Department of Transport personnel who can then dispatch tow trucks or mobile mechanics to stranded civilians.

Just a thought I had. It works in theory, but would FiveM allow for that kind of script?

Not sure how you plan on rendering the game with no connected client. As the server does not render anything so you’d need to have a client connected to do such a thing.

Yea, that’s a good point.

It appears I have overlooked that.
Thank you

1 Like

arguably… if you dont want to render the actual game, but instead an abstract summary of what the CCTV camera can see (eg just square shapes where players/vehicles would be), you could do it

Yea, my vision was that you could see everything happening live from an outside source.

Oh well, my brain was a little tired when I asked but I was super proud of myself for thinking of a “good” idea lol.

In that case, does anyone know of any CCTV scripts that actually record and save recordings but is not triggered only by a crime happening in it’s vicinity?
I know there is a paid script where you can get camera recordings and stuff but it only triggers if a crime (in QBCore, maybe ESX as well) is committed.
Hoping there is a standalone cctv script that just continuously records and saves recordings and then deletes footage after a short time.

again, if you wanted to record something - you’d need a client (player) that’s dedicated to rendering the CCTV’s point of view, it’s not possible otherwise

I was thinking more like this one: Recording Security Cameras with Playback & Rewind

But it’s always recording as opposed to only being triggered by certain events in its vicinity and has temp storage to presumably a database where the recordings are stored for a small amount of time.

Hey, I had previously looked into creating something similar however I eventually ditched it due to using too much resources (not just resmon ingame but overall network resources with image uploading).

The way I made it was basically taking screenshots of the player screen everytime he was in LoS of the camera, and then those screenshots would be processed by a external script (running on a webserver) and would add grain based on the distance and a few other factors.

I stopped the development cause I realized that when escalating this to more players it would become a problem how much traffic was required and space to store the images, even though they were heavily compressed.

The way the script you posted does it seems to be more of telemetry kind of deal, where they basically don’t record video but rather store the position of all entities and then play it when you ask. So that will always be fully ingame, unless, as someone said, you could somehow render that in the web.

I already tried to get their recording script open source, but they are not willing to sell and I also don’t believe they want to make it actively recording everytime the player is in LoS of a camera.

in those cases - you’re better off recording events rather what the game is doing exactly, and when playing back, you recreate those events with fake peds in place of players reannacting all the tasks, but at that point you’re essentially creating a replay system