The NCIC system was released for the public on here a long time ago but was removed or unlisted because it wasn’t updated to work with FX-servers.
I have the original NCIC files and my heavily edited version that @WolfKnight179 helped me get working on FX-Servers.
Here is the original NCIC Resource for FX-Servers
Server.lua
--[[------------------------------------------------------------------------
Main Serverside File
------------------------------------------------------------------------]]--
AddEventHandler( 'chatMessage', function( source, name, msg )
local sm = splitString( msg, " " )
local has_warrant = false
local caution_code = ""
--Vehicle search vars
local has_file = false
local has_insurance = false
local has_registration = false
local is_stolen = false
local reg_type = ""
local deal_alert = true
if sm[1] == "/id" then
CancelEvent()
if tablelength(sm) > 1 then
math.randomseed( os.time() )
local random_tickets = math.random(0, 5)
local random_arrests = math.random(0, 5)
local random_warrant = math.random(0, 100)
local random_caution = math.random(0, 100)
if random_warrant <= 20 then
has_warrant = true
end
if random_caution >= 10 and random_caution < 20 then
caution_code = caution_code .. "Drug History "
elseif random_caution >= 21 and random_caution < 31 then
caution_code = caution_code .. "Resiting Arrest History "
elseif random_caution >= 32 and random_caution < 42 then
caution_code = caution_code .. "Weapon Charges "
elseif random_caution >= 43 and random_caution < 53 then
caution_code = caution_code .. "Violent Aggressive "
elseif random_caution >= 54 and random_caution < 74 then
caution_code = caution_code .. "Numerous Traffic Offenses "
elseif random_caution >= 75 and random_caution < 99 then
caution_code = caution_code .. "No Prior History "
end
if has_warrant == true then
if caution_code == "" then
TriggerClientEvent('chatMessage', source, "^1NCIC", {255, 0, 0}, "^0History for " .. sm[2] .. " " .. sm[3] .. ": " .. random_tickets .. " ticket(s), " .. random_arrests .. " arrest(s). Wants & Warrants: ^1W; ^0Caution Code(s): ^2None")
else
TriggerClientEvent('chatMessage', source, "^1NCIC", {255, 0, 0}, "^0History for " .. sm[2] .. " " .. sm[3] .. ": " .. random_tickets .. " ticket(s), " .. random_arrests .. " arrest(s). Wants & Warrants: ^1W; ^0Caution Code(s): ^1" .. caution_code)
end
else
if caution_code == "" then
TriggerClientEvent('chatMessage', source, "^1NCIC", {255, 0, 0}, "^0History for " .. sm[2] .. " " .. sm[3] .. ": " .. random_tickets .. " ticket(s), " .. random_arrests .. " arrest(s). Wants & Warrants: ^2None; ^0Caution Code(s): ^2None")
else
TriggerClientEvent('chatMessage', source, "^1NCIC", {255, 0, 0}, "^0History for " .. sm[2] .. " " .. sm[3] .. ": " .. random_tickets .. " ticket(s), " .. random_arrests .. " arrest(s). Wants & Warrants: ^2None; ^0Caution Code(s): ^1" .. caution_code)
end
end
end
elseif sm[1] == "/plate" then
CancelEvent()
if tablelength(sm) > 1 then
math.randomseed( os.time() )
local random_nofile = math.random(0, 100)
local random_noins = math.random(0, 100)
local random_noreg = math.random(0, 100)
local random_stolen = math.random(0, 100)
if random_nofile <= 25 then
has_file = false
else
has_file = true
end
if random_noins <= 20 then
has_insurance = false
else
has_insurance = true
end
if random_noreg <= 10 and random_noreg > 20 then
has_registration = false
reg_type = "None"
elseif random_noreg <= 25 and random_noreg > 45 then
has_registration = false
reg_type = "Expired Registration"
else
has_registration = true
reg_type = "Valid"
end
if random_stolen <= 20 then
is_stolen = true
else
is_stolen = false
end
if is_stolen == true then
if has_insurance == false then
if reg_type == "Valid" then
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^0Records for " .. sm[2] .. ": ^0Stolen: ^0Flagged as stolen^0, ^0Insurance: ^1None^0, ^0Registration: ^2" .. reg_type)
else
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^0Records for " .. sm[2] .. ": ^0Stolen: ^0Flagged as stolen^0, ^0Insurance: ^1None^0, ^0Registration: ^1" .. reg_type)
end
else
if reg_type == "Valid" then
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^0Records for " .. sm[2] .. ": ^0Stolen: ^1Flagged as stolen^0, ^0Insurance: ^2Valid^0, ^0Registration: ^2" .. reg_type)
else
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^0Records for " .. sm[2] .. ": ^0Stolen: ^1Flagged as stolen^0, ^0Insurance: ^2Valid^0, ^0Registration: ^1" .. reg_type)
end
end
elseif is_stolen == false then
if has_insurance == false then
if reg_type == "Valid" then
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^0Records for " .. sm[2] .. ": ^0Stolen: ^2Clear^0, ^0Insurance: ^1None^0, ^0Registration: ^2" .. reg_type)
else
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^0Records for " .. sm[2] .. ": ^0Stolen: ^2Clear^0, ^0Insurance: ^1None^0, ^0Registration: ^1" .. reg_type)
end
else
if reg_type == "Valid" then
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^0Records for " .. sm[2] .. ": ^0Stolen: ^2Clear^0, ^0Insurance: ^2Valid^0, ^0Registration: ^2" .. reg_type)
else
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^0Records for " .. sm[2] .. ": ^0Stolen: ^2Clear^0, ^0Insurance: ^2Valid^0, ^0Registration: ^1" .. reg_type)
end
end
end
end
elseif sm[1] == "/vin" then
CancelEvent()
math.randomseed( os.time() )
local stolen_chance = math.random(0, 100)
if stolen_chance <= 15 then
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^1VIN flagged as stolen!")
else
TriggerClientEvent('chatMessage', source, "^1DMV", {255, 0, 0}, "^2VIN clear.")
end
end
end)
function splitString( inputstr, sep )
if sep == nil then
sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
t[i] = str
i = i + 1
end
return t
end
function tablelength(T)
local count = 0
for _ in pairs(T) do count = count + 1 end
return count
end
use this for the resource.lua file
-- Converted to FX by mr WolfKnight
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
server_script 'server.lua'
My version of it is integrated with Wolfknight’s action menu resource so it got rid of all the /ncic commands.
It includes a random generated vehicle search system based off of @xander1998 old K9 search script as well. Instead of a dog searching the vehicle a police officer does it. All the scripts can have new random options added/deleted fairly easily as well.
That K9 script uses a similar system, you can download that and see how xander had RNG results setup if the NCIC system isn’t what you want.
This is not like the dispatch system, it’s not an MDT/CAD system, everything is randomly generated based on what you put into the script. I play cops vs robbers with 8 of my friends and we use it for random scenarios when we get bored or just want a reason to chase/harass someone.