Giter VIP home page Giter VIP logo

cameratech's Introduction

CameraTech

CameraTech is a resource for FiveM by Albo1125 that provides for an indepth Automatic Number Plate Recognition (ANPR/ALPR) system simulation.

CameraTechVideo

Installation & Usage

  1. Download the latest Release.
  2. Unzip the CameraTech folder into your resources folder on your FiveM server.
  3. Create a file called fixedanprcameras.json in the CameraTech folder. You can usually simply rename the fixedanprcameras.default.json to do so. Optionally, add or remove fixed ANPR cameras on the map, following the format of the provided default file.
  4. Add the following to your server.cfg file:
start CameraTech
  1. Install the InteractSound resource. Add sound files of your choice to InteractSound called FixedANPR.ogg and VehicleANPR.ogg. Examples have been included in this release.
  2. Optionally, create a new file called anprvehicles.json in the CameraTech folder. See Customising your ANPR vehicles below for further guidance.
  3. Optionally, enable the ANPR whitelist in vars.lua and add identifiers. This only affects commands for use of police.
  4. Optionally, in sv_CameraTech.lua, uncomment lines 5 to 7 and 16 to 18 and in fxmanifest.lua uncomment line 14. This will make the script insert a new row into a MySQL database whenever a fixed ANPR hit comes in (e.g. for web-based control purposes).
  5. Optionally, in fxmanifest.lua, change the ForceFocusedAnpr setting to true. This means users will not be able to receive fixed ANPR alerts unless they have a plate focused. This is useful if you want your control room to initially circulate ANPR hits to units before the units see the hits themselves.

Customising your vehicles

You have two options for customising your ANPR vehicles.

  • Firstly, you can add a anprvehicles.json file to the CameraTech folder. If this file is present, it will always be used. See anprvehicles.default.json for an example.
  • Secondly, you can load your anprvehicles.json contents dynamically. If no anprvehicles.json file is present in the resource folder, the client will trigger a server event CameraTech:GetANPRModelsJsonString() when they use the /anpr command for the first time. The client will listen for a CameraTech:ANPRModelsJsonString(jsonString, runAnprCommandEnable) event from the server. jsonString should be a valid JSON string in the anprvehicles.json format, runAnprCommandEnable should be true if the event was triggered by a specific player using the ANPR command, false otherwise. The CameraTech:ANPRModelsJsonString(jsonString, runAnprCommandEnable) event can also be triggered periodically by the server to update the ANPR vehicle models for all players (-1), make sure runAnprCommandEnable is set to false in that case.

You can add as many entries to the root array as you like. If a vehicle model appears in the file multiple times, all ANPR Access Types will be added on top of the others. JSON reference is as follows.

ANPRVehicle JSON Object Entry

  • "ModelName" string indicating the ingame Model Name of the vehicle.
  • "ANPRAccessType" which should be one of: "full", "fixed only", "vehicle only".

Commands

  • /anpr - Toggles the ANPR interface if you are in a vehicle that has access to ANPR (Whitelisted).
  • /fixedanpr - Toggles ANPR alerts from fixed ANPR cameras on the map (Whitelisted).
  • /vehicleanpr (alias /vehanpr) - Toggles ANPR alerts from vehicle ANPR cameras (Whitelisted).
  • /readplate (alias /rp) - Reads the plate of the vehicle in front of you and puts it in chat.
  • /checkplate PLATE - Returns the ANPR markers currently active for the specified plate.
  • /focusanpr PLATE - Only displays fixed ANPR alerts for the specified PLATE and automatically draws a route if any hit comes in. Leave PLATE blank to unfocus or to focus the plate that last triggered a fixed ANPR alert.
  • /setplateinfo PLATE;INFO - Adds ANPR markers (INFO) for the specified plate. Leave INFO blank to remove markers. Example: /setplateinfo AB12CDE;STOLEN
  • /setvehinfo INFO - Adds ANPR markers (INFO) for the plate of the vehicle you're currently in. Leave INFO blank to remove markers. Example: /setvehinfo STOLEN

Improvements & Licencing

Please view the license. Improvements and new feature additions are very welcome, please feel free to create a pull request. As a guideline, please do not release separate versions with minor modifications, but contribute to this repository directly. However, if you really do wish to release modified versions of my work, permission & proper credit is always required and you should always link back to this original source and respect the licence.

Libraries used (many thanks to their authors)

Video

Click here (please note setup instructions have changed slightly)

Screenshots

CameraTech

cameratech's People

Contributors

albo1125 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cameratech's Issues

Query Vehicle Plates and Flags from MySQL database

The ability for CameraTech to pull vehicle plates and flags from a MySQL Database would make it very powerful in the hands of LEO for larger FiveM communities. As of now as I understand it the MySQL operation it currently has is logging when a target plate is detected by a fixed ANPR in a MySQL database along with where it was detected. Adding the ability for it to query a database when a vehicle occupied by a player passes a fixed ANPR and check if the plate has flags would allow for persistence between shutdowns and the ability to integrate seamlessly with third party CADs and BOLO systems. As well the chat commands could be altered to store the information in the database.
This is a feature request.

Access to system

Having problem give other player access to the system coming up with access denied or no permissions given can some one help pls

Map Blips

Hello! @Albo1125 i really like the Idea behind this but my Problem is that i dont see any Map Blips on the Map. Any Help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.