Comment on page
Lookups
Implements name and plate lookups via the CAD.
This plugin utilizes API endpoints that require the plus version of Sonoran CAD or higher. For more information, view our pricing page.
This plugin is currently only used as a dependency for other plugins, and does not have any in-game commands for general player usage.
This plugin Implements name and plate lookups via the CAD.
- 1.
- 1.
Do not set the cache timer too low or you may run into rate limiting.
Option | Description | Default |
maxCacheTime | How long to cache a looked-up plate. | 120 seconds |
stalePurgeTimer | How long between "stale" plate cleanups (keep unscanned plates) | 600 seconds (10 minutes) |
Function | Arguments | Description | Returns |
cadNameLookup | FirstName, MiddleInitial, LastName, callback | Looks up a character based on the arguments specified. | Objects containing character data and all associated objects. |
cadPlateLookup | plate, basicFlag, callback, autoLookup | Looks up a vehicle based on specified plate number. | Objects containing vehicle data and all associated objects. |
--[[
cadNameLookup
first: First Name
last: Last Name
mi: Middle Initial
callback: function called with return data
]]
function cadNameLookup(first, last, mi, callback)
--[[
cadPlateLookup
plate: plate number
basicFlag: true returns cached record if possible which only contains vehicleRegistrations object, false calls the API
callback: the function called with the return data
autoLookup: when populated with an API ID, pops open a search window on the officer's CAD (optional)
]]
function cadPlateLookup(plate, basicFlag, callback, autoLookup)
This plugin also adds the commands
namefind
and platefind
which takes the above arguments and prints the returned JSON object to the console.Last modified 2mo ago