Developers
Plate lookups from your resource
Call PlateNet from your own FiveM resource - send ALPR scans through the CAD and light your own alert indicators.
Call PlateNet from your own resource on the same server. Two exports: send plate scans through the CAD, or check a plate for an active alert. No key or token goes in your resource.
Setup
Have the server owner name your resource in PlateNet's server/security.lua, then restart platenet:
PlateNetSecurity = {
PlateScanners = {
['your_alpr_resource'] = true,
},
AlertChecks = {
['your_radar_resource'] = true,
},
}
Put that grant in your install instructions. PlateScanners covers ScanPlate, AlertChecks covers IsPlateAlerted. Use the table names already in that file - an older copy calls them ScanSources and AlertReaders. The key is the resource folder name, exactly.
ScanPlate
Run a plate through the CAD. A hit is delivered to the officer's tablet as a query return - your resource is done once the scan is accepted.
The usual pairing is to read a plate, ask IsPlateAlerted whether to light your indicator, and call ScanPlate on a hit so the officer gets the full return on their tablet. Both calls draw on the same per-officer cap below.
The same plate does not reach the same officer twice within ten minutes. The repeat scan still answers accepted: true and produces no second return, so scan as often as you like.
exports.platenet:ScanPlate(src, plate, function(result)
if not result.success then
print(result.error)
end
end)
src- number, required. Server id of the officer whose scanner saw the plate. That officer needs a paired tablet.plate- string, required. 1-20 characters.
Response:
{ "success": true, "accepted": true }
IsPlateAlerted
Check one plate and light your own warning indicator.
exports.platenet:IsPlateAlerted(src, plate, function(result)
if result.success and result.alert then
ShowAlertIndicator(result.category)
end
end)
Same parameters as ScanPlate. Pass the callback - the answer arrives nowhere else.
Response on a hit:
{ "success": true, "alert": true, "category": "stolen_vehicle" }
A clean plate answers alert: false and carries no category. Alert state is all this export returns - no owner, no record, no BOLO text.
category | The plate is |
|---|---|
stolen_vehicle | Flagged stolen |
bolo | Named in an active BOLO |
registration_suspended | On a suspended registration |
registration_expired | On an expired registration |
Handle an unknown category as a generic alert - the list grows.
Rate limit
Two caps apply to every call:
- 60 per minute, per resource, per officer - answers
Rate limit reached. - 60 per minute, per officer, across every resource - answers
PlateNet request failed.
Two scanners running on the same officer share the second cap. Space your scans out client-side.
Errors
result.error is one of six strings. Nothing else is ever returned.
result.error | Do |
|---|---|
Access denied. | Have the server owner add your resource to server/security.lua and restart PlateNet. The server console names the export and the resource it blocked. |
Invalid player. | Pass a server id as a number. |
Invalid plate. | Pass a string of 1 to 20 characters. |
Player is not paired. | Also sets unpaired = true. Send them to pair a tablet. |
Rate limit reached. | Your resource hit its own cap. Back off until the minute turns over. |
PlateNet request failed. | Everything CAD side - the shared cap, an expired session, an unreachable CAD. Back off and retry. |
Back to the PlateNet documentation index / All Developers pages