Jixryo Cameras
Security camera networks anywhere on the map. Techno Unlimited installs home and business networks, the police run city cameras, and owners, the people they share with and officers watch them live from the tablet and the MDT.
Version 1.1.0 Updated See it on its script page
On this page
Jixryo Cameras puts security camera networks anywhere on the map. Techno Unlimited technicians install home and business networks for customers, and each police department has a city network that goes up from the MDT or by officers with the camera unit. Owners, the people they share with, and officers for their department's cameras watch them live on the Jixryo Tablet, and the police inside the MDT's Cameras page too.
What players get
- A network is a router, its cameras and the people who may watch them. Home and business networks have an owner, who can share them with up to 10 people, and run through a router. A police department has one city network with no router.
- Three camera styles, each its own model and all the same Security Camera unit from Techno Unlimited: Outdoor bullet (walls and poles, 30 m, fixed view, night vision), Corner dome (walls and corners, 20 m, turns 55° and tilts 20°, night vision) and Ceiling dome (indoors, flat on the ceiling, 14 m, wide, turns 70° and tilts 25°).
- Routers in three tiers: Basic $250, Secure $600, Pro $1,200. Cameras further than 85 m from their router are offline. GTA has no router model, so a small CCTV controller stands in.
- Offline, and why. The camera is damaged, the power is cut where it stands, it is out of the router's range, the router is damaged, or there is no router. A shot or rammed camera or router goes offline at once, its prop shows the damage, and the owner is told.
- Activity. People walking past and vehicles driving past a camera are logged per network, with the vehicle's make, plus damage and install notes. The last 200 lines per network are kept.
- Live view. The tablet goes away and the camera's feed takes the screen: scanlines, the camera's own direction, the mouse to turn on the styles that turn, scroll to zoom, right mouse for night vision (on by itself at night on the styles that have it), the arrow keys to the network's other cameras, Esc to leave. "Signal lost" if the camera goes offline while you watch. Not while you are driving, and taking damage ends the feed.
- The Cameras app on the tablet, for everyone: your networks, a grid of each one's cameras with live or offline and why, go live, the activity feed (everything, or only people, vehicles or damage; Watch jumps to that camera), rename a network or a camera, alerts on or off per network, share with someone standing next to you or stop sharing. Police see their department's network in it while on duty.
- Installs, for Techno Unlimited staff, as a page of the Techno Unlimited app (Work › Installs). New package: pick the customer standing with you (within 12 m), a router tier and up to 8 cameras; they see the offer on their own screen for 30 seconds and pay from their bank if they agree. The company account gets it and the technician their commission. Networks: put the router in (or move it, or take it out), mount cameras by style within its range (each takes one unit from your pockets) until the package is used, sell the owner more cameras, GPS to the router.
- Installing a camera (technician): sell the package with the customer next to you; put the router in (a see-through router follows your aim on any flat surface within 4 m, E places it); mount a camera (pick the style, aim at a wall, or a ceiling for the dome; the panel on the right shows the direction, tilt, height, distance to the router and what is left in the package; scroll turns it, the arrow keys tilt it, V looks through its lens, E walks up and mounts it over a 7-second progress bar). At a camera, the third eye offers Take the camera down (the unit comes back when it is intact and the package gets the slot back) and Swap in a new unit (fixes a damaged one).
- Police cameras. While
Config.police.officersMountis on (the default), an on-duty officer uses the Security Camera unit, picks the style and places it the same way; it joins the department's network asPD-01,PD-02and so on, up to 60. Police take down and repair their department's cameras at the camera. In the MDT, officers on duty see their department's cameras, watch one (Esc brings the MDT back), rename them and follow the activity; damage to one goes on every officer's bell.
What staff get
- Department cameras from the MDT. Staff with
group.god,group.adminorjixryo.security.adminopen the MDT's Cameras page, pick a police department and a style, and Put one up. The tablet goes away, they aim and place it the same way, and it joins that department's network. No unit is needed, and they may watch every department's cameras. - Officers' mounting is a switch. Set
Config.police.officersMount = falseand only staff put department cameras up; the unit then tells officers to ask staff. - An audit trail in the suite's audit log through Jixryo Core: sales with their commission, extra cameras sold, router installs and moves, mounts, staff installs, take-downs, repairs and sharing.
- Power cuts for your scripts.
SetBlackoutcuts the power over a circle for a time; every camera inside, the department's included, is offline until it ends. Jixryo Prison uses it when its generator is killed. - Nothing runs idle. Cameras and routers exist on a client only within 60 m of a player, spawned from points. Motion is checked by the clients near a camera every 1.5 seconds, and only while one is in range.
Install
What it replaces. Nothing. It is new ground, and it takes over no stock camera resource.
Order. Start it after Jixryo Core, the tablet and the Techno Unlimited resources. Without
jixryo_technounlimited_appsthere are no installs (the Cameras app and police cameras still work); without the tablet there is no Cameras app. Neither Techno Unlimited resource is in the store today.server.cfg ensure jixryo_core ensure jixryo_tablet ensure jixryo_technounlimited ensure jixryo_technounlimited_apps ensure jixryo_securityIts manifest also depends on ox_lib, oxmysql, qbx_core, ox_inventory and ox_target.
Items. The camera unit is Techno Unlimited's
tu_security_cam; it must be in ox_inventory's items (it is injixryo_technounlimited's README item list). Techno Unlimited makes it at its camera bench and sells it in its showroom.Database. The tables
jixryo_sec_networks,jixryo_sec_camerasandjixryo_sec_eventsare created on the first start, as a numbered Jixryo Core migration step.The pages are prebuilt in
web/build:index.htmlfor the live view and the placement overlay,cameras.htmlfor the Cameras app.Restart the whole server, not just the resource.
How other scripts' calls behave
- It answers as itself only. Its exports live under
jixryo_security; it answers no other camera script's names. - The MDT (Jixryo MDT 2.0 or later) builds its Cameras page from
MdtCameras,MdtCameraSummaryandMdtRenameCameraon the server andWatchCamera,InstallDepartmentCameraandPlaceNameon the client, and hears a damaged department camera through the server eventjixryo_security:server:deptTamper. - The Techno Unlimited app (
jixryo_technounlimited_apps) hands its Installs page's calls to the client exportInstallCalland listens forjixryo_security:client:networkChangedto refresh. This resource asks that app forRequireStaff(who is TU staff),Payout(the company account and the technician's commission) andGetJob. - The prison cuts the power with
SetBlackoutandClearBlackout. - It uses the tablet's
AddApp,Notify,Open,Close,IsOpen,GetCurrentApp,SendAppMessageandSoundsOn; qbx_core'sGetJobsandCreateUseableItem; ox_target's local entity options on the props; and Jixryo Core's HUD (notifications, sounds, progress bars, the customer's confirm), inventory, player money (from the bank, reasontechnounlimited-install), rate limits, validation and audit. - Jobs. Police are the qbx_core jobs of type
leo(Config.police.jobTypes), on duty. Techno Unlimited's job name comes from its apps resource.
Its own API
Exports:
| Export | Side | What it does |
|---|---|---|
SetBlackout(id, center, radius, seconds) | server | Cuts the power over a circle for seconds. Every camera inside, the department's included, is offline ("no power") until it ends; anyone watching one gets "signal lost", and each affected network's owners are told once. Calling it again with the same id replaces that cut. Returns true when the arguments were good. |
ClearBlackout(id) | server | Ends a cut early. |
MdtCameras(src, dept) | server | The MDT's Cameras page: the department, its network and cameras, activity, the styles, and for staff every department and canInstall. An on-duty officer gets their own department; staff may name one. |
MdtCameraSummary(src) | server | The dashboard's line: total, online, offline, what is down and why, and recent damage. |
MdtRenameCamera(src, id, label) | server | Renames a department camera (its department on duty, or staff). |
InstallCall(name, data, reply) | client | How the Techno Unlimited app hands over its Installs page's calls (installBoot, installCreate, installAddCameras, installRouterRemove, placeRouter, placeCamera); reply(result) answers. The server checks each one like any other call. |
WatchCamera(id, returnApp) | client | The live view from a tablet app; leaving brings the tablet back on that app (the MDT by default). Returns true, or false and why not. |
InstallDepartmentCamera(dept, style, returnApp) | client | Staff placement into a department's network, no unit needed. Returns the server's answer. |
PlaceName(x, y, z) | client | The area and street at a point, as the game names them. |
Events:
| Event | Direction | What it carries |
|---|---|---|
jixryo_security:server:deptTamper | server event only | (dept, event): a department camera or router was damaged. The MDT checks it came from this resource. |
jixryo_security:client:networkChanged | to the people on a network | the network id; the Cameras app and the Techno Unlimited app reload it |
jixryo_security:client:event | to the people on a network | an activity line as it happens |
jixryo_security:client:camera, :cameraRemoved, :router | to every client | a camera or router changed, for the props and the live view |
The app's own calls are jixryo_security:server:<name> callbacks and the net events jixryo_security:server:motion and jixryo_security:server:damaged. They are not an API, and the server checks every one.
Commands and keybinds
There are no commands. The keys below work only while placing a camera or watching one; the Cameras app's keys are the tablet's.
| Key | When | What it does |
|---|---|---|
| Scroll | placing | Turns the camera (a wall camera swivels up to 35° on its bracket) or the router |
| Up and down arrows | placing a camera | Tilts the view |
| V | placing a camera | Four seconds through the lens |
| E or Enter | placing | Puts the router down, or walks up and mounts the camera |
| Esc or Backspace | placing, watching | Stops placing, or leaves the feed |
| Mouse | watching a dome | Turns it within its style's limits |
| Scroll | watching | Zooms |
| Right mouse | watching a camera with night vision | Night vision on or off |
| Left and right arrows | watching | The network's other online cameras |
| Third eye at a camera | technicians and police | Take the camera down, or swap in a new unit |
| Using the Security Camera unit | on-duty police, while officers may mount | Pick a style and place a department camera |
Configuration
config.lua holds every value the server decides with.
| Key | Default | What it does |
|---|---|---|
cameraItem | 'tu_security_cam' | The camera unit |
styles.outdoor | prop_cctv_cam_01a, wall, 30 m, 62°, fixed, night vision | Outdoor bullet |
styles.corner | prop_cctv_cam_04c, wall, 20 m, 80°, pan 55°, tilt 20°, night vision | Corner dome |
styles.ceiling | prop_cctv_cam_07a, ceiling, 14 m, 95°, pan 70°, tilt 25° | Ceiling dome |
router | prop_cctv_cont_06, range 85 m | The router model and how far its cameras work |
tiers | basic 250, secure 600, pro 1200 | What the customer pays to set a network up. security, alertOwner and alertPolice are for the planned hack mission and show on Installs only |
install | perCamera 800, maxCameras 12, maxPerOrder 8, customerRange 12, consentSeconds 30, maxNetworks 3 | Price per camera, cameras per network and per package, how close the customer stands, how long they have to answer, networks one person can own |
placement | reach 4, minSpacing 1.5, maxHeight 9, previewAlpha 170, seconds 7 | Reach, spacing, height, the ghost's alpha, the mounting time |
police | jobTypes { 'leo' }, maxCameras 60, labelPrefix 'PD', installAce group.god, group.admin, jixryo.security.admin, officersMount true | Police job types, cameras per department, the label prefix, who installs from the MDT, whether officers mount the unit |
sharing | range 5, max 10 | Sharing distance and how many people |
detection | enabled, activationRange 60, interval 1500, perCameraCooldown 30, entityMemory 45000, people, vehicles, losCheck | Motion checks: range, ms between checks, seconds between two events on one camera, ms before the same person or car counts again, what counts, line of sight |
events.keep | 200 | Activity lines kept per network |
live | fov 60, minFov 18, maxFov 70, zoomStep 4, timecycle scanline_cam_cheap at 0.6, nightFrom 20, nightTo 6, freezeViewer, reopenTablet | The live view's zoom, look, night hours, freezing the viewer, back to the tablet after |
alerts | motion, tamper | Which alerts go out |
Security
- Identity, ownership, sharing, the police department and TU staff are checked on the server for every call, from
source. TU staff are checked through the Techno Unlimited app'sRequireStaff. - Placement. The client sends a spot and a direction; the server checks the coordinates, the reach (4 m plus a margin), the spacing to other cameras (1.5 m, counting spots being written), the router's range, what is left in the package or the department's 60, and that the unit is in your pockets. It takes the unit before it writes the camera, and gives it back if the write fails. A staff install from the MDT is checked the same way with no unit, plus staff and a real police department, and it is audited.
- The MDT exports re-check the player on every call: an on-duty officer sees only their own department's network, staff any.
- Installs. The customer's own answer, on their own screen, is the only yes; the price is worked out on the server and the customer is charged there, and refunded if writing the network fails. A customer answers one offer at a time.
- Motion is spotted by the clients near a camera (players only). The server checks the camera exists and is online, that the reporter is near it (84 m), the 30-second cooldown, and names what was seen itself; nothing a client writes is stored. Damage reports are checked the same way, and a damaged camera or router can be reported once until it is fixed.
- What clients learn about the world (where cameras and routers are, within 450 m) never carries an owner.
- The in-memory copy is the authority, loaded at start and written through on every change. Anything that removes something leaves memory before the database is waited on, so two requests never both succeed.
- Rate limits on every call. Sales with the commission (
security.install.sell), extra cameras (security.install.add), router installs and moves (security.install.router), mounts (security.camera.mount), staff installs (security.camera.staff_install), take-downs (security.camera.remove), repairs (security.camera.repair) and sharing (security.share) go to the suite's audit log. - The live view is granted by the server: the player must be allowed to watch the network, the camera must be online, and not while driving.
Tests
Jixryo Cameras has no automated suite of its own. The MDT's suite (dev-tools/luarun/tests/jixryo_mdt.lua) checks the MDT's side of the camera exports through stand-ins that answer with this resource's real shapes, and that camera damage reaches the bell only when this resource fired the event. Its README asks for the live view to be checked in game: the lens positions of the three vanilla models are estimates.
Check it in game
- As a Techno Unlimited technician on duty, open Work › Installs with a customer standing next to you. Sell a Basic package with two cameras: the customer sees the offer on their screen and pays from their bank, and the network shows under Networks.
- Put the router in: a see-through router follows your aim; E places it. The tablet comes back on Installs.
- Mount a camera: pick Corner dome and aim at a wall. The panel shows the direction, tilt, height and the distance to the router. Scroll turns it, the arrows tilt it, V looks through the lens, E mounts it. It shows up and online.
- As the customer, open Cameras on the tablet: the network, its cameras, go live. The feed takes the screen; the mouse turns the dome, scroll zooms, right mouse switches night vision, Esc brings the tablet back on Cameras.
- Walk past the camera as another player: the activity logs a person and the owner is told. Drive past: a vehicle, with its make.
- Share the network with someone standing next to you: they see it in their Cameras app. Stop sharing and it goes.
- Shoot the camera: it goes offline (damaged), its prop hangs at an angle, and the owner is told. At the camera, third eye, Swap in a new unit: it is back online.
- As an on-duty officer, use the Security Camera unit: pick a style, aim and mount. It joins the department network as PD-01. In the MDT's Cameras page, watch it; Esc brings the MDT back.
- As staff, from the MDT's Cameras page, pick a department and a style and Put one up: no unit is needed.
- Kill the prison generator (Jixryo Prison): cameras in the area go offline ("no power") and come back when the power does.