This is the models list and the thiefinprogress edit so it shows a plate number after the vehicle gets stolen. Makes it a bit easier to track down the cars. I might switch the alert to a chat alert so its easier to remember the vehicle plate number.
If you aren’t getting alerts make sure you setup your player skins to receive alerts and remember that if you are the origin/source of the alert you won’t see what alert you trigger unless you edit the code.
local PedModels = {
"s_m_y_cop_01",
's_m_m_snowcop_01',
's_m_y_hwaycop_01',
's_f_y_cop_01',
's_m_y_sheriff_01',
's_m_y_ranger_01',
's_m_m_armoured_01',
's_m_m_armoured_01',
's_f_y_sheriff_01',
's_f_y_ranger_01',
's_m_m_ciasec_01',
's_m_m_armoured_01',
's_m_m_armoured_02',
'u_m_m_fibarchitect',
's_m_y_swat_01',
's_m_m_fiboffice_01',
's_m_y_doorman_01',
's_m_m_prisguard_01',
's_m_m_highsec_01',
's_m_m_highsec_02',
's_m_m_security_01',
's_m_m_chemsec_01',
's_m_m_armoured_01',
's_m_m_armoured_02'
}
If you want it so that the car alerts the stolen vehicles license plate you just need to add a couple quick lines to the Thief in progress part of the resource.
Located in Client.lua around line ~210
Citizen.CreateThread( function()
while true do
Wait(0)
local plyPos = GetEntityCoords(GetPlayerPed(-1), true)
local s1, s2 = Citizen.InvokeNative( 0x2EB41072B4C1E4C0, plyPos.x, plyPos.y, plyPos.z, Citizen.PointerValueInt(), Citizen.PointerValueInt() )
local street1 = GetStreetNameFromHashKey(s1)
local street2 = GetStreetNameFromHashKey(s2)
if IsPedTryingToEnterALockedVehicle(GetPlayerPed(-1)) or IsPedJacking(GetPlayerPed(-1)) then
origin = true
-- DecorSetInt(GetPlayerPed(-1), "IsOutlaw", 2)
local male = IsPedMale(GetPlayerPed(-1))
if male then
sex = "men"
elseif not male then
sex = "women"
end
TriggerServerEvent('thiefInProgressPos', plyPos.x, plyPos.y, plyPos.z)
local veh = GetVehiclePedIsTryingToEnter(GetPlayerPed(-1))
local vehName = GetDisplayNameFromVehicleModel(GetEntityModel(veh))
local vehName2 = GetLabelText(vehName)
local plate = GetVehicleNumberPlateText(veh)
if s2 == 0 then
TriggerServerEvent('thiefInProgressS1', street1, vehName2, plate, sex)
elseif s2 ~= 0 then
TriggerServerEvent('thiefInProgress', street1, street2, vehName2, plate, sex)
end
Wait(5000)
origin = false
end
end
end)
Go to server.lua and replace these lines at the top.
RegisterServerEvent('thiefInProgress')
AddEventHandler('thiefInProgress', function(street1, street2, veh, sex, plate)
if veh == "NULL" then
TriggerClientEvent("outlawNotify", -1, "~r~Stolen Vehicle Reported: ~w~"..sex.." ~r~between ~w~"..street1.."~r~and ~w~"..street2)
else
TriggerClientEvent("outlawNotify", -1, "~r~Stolen Vehicle Reported: ~w~"..veh.." ~r~by a ~w~"..sex.." ~r~between ~w~"..street1.."~r~and ~w~"..street2.."~r~ Plate: ~w~"..plate)
end
end)
RegisterServerEvent('thiefInProgressS1')
AddEventHandler('thiefInProgressS1', function(street1, veh, sex, plate)
if veh == "NULL" then
TriggerClientEvent("outlawNotify", -1, "~r~Stolen Vehicle Reported: ~w~"..sex.." ~r~at ~w~"..street1)
else
TriggerClientEvent("outlawNotify", -1, "~r~Stolen Vehicle Reported: ~w~"..veh.." ~r~by a ~w~"..sex.." ~r~at ~w~"..street1.." ~r~Plate: ~w~"..plate)
end
end)
If this doesn’t work for some reason let me know and I’ll just grab the actual script we use in the server when I get home from work.