[Release] Simple outlaw alert (11-04-2017)

No, the only glitch I’ve encountered is when stealing a parked car doesn’t trigger the alert. However stealing a parked car from any other door besides the driver door will always trigger the alert.

I’d recommend adding the vehicle plate number as part of the alert as well, its very easy to add.

Looks like you need to add the skins that show the crimes from what I have tested.

can you send me your script file? :smiley:

Sex doesn’t seem to be working even with female skins under peds.

Just add the peds you use on your server. All peds listed will see the notifications!

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',
		'a_m_m_bevhills_01',
		'a_f_y_bevhills_03',
	    'g_m_y_azteca_01',
	    'g_f_y_ballas_01',
	    'a_f_y_bevhills_01',
	    'a_m_y_bevhills_01',
	    's_m_m_bouncer_01',
	    'a_f_y_hipster_04',
	    'a_m_m_indian_01',
	    'a_m_m_bevhills_01',
	    'u_m_y_hippie_01',
	    'u_f_y_bikerchic',
		's_f_y_hooker_03',
	    's_f_y_hooker_01',
	    's_f_y_hooker_02',
		'a_m_m_hillbilly_01',
	    'a_m_m_hillbilly_02',
	    'a_m_y_hippy_01',
		'a_f_y_bevhills_03',
	    'g_m_y_azteca_01',
	    'g_f_y_ballas_01',
	    'a_f_y_bevhills_01',
	    'a_m_y_bevhills_01',
	    's_m_m_bouncer_01',
	    'a_f_y_hipster_04',
	    'a_m_m_indian_01',
	    'a_m_m_bevhills_01',

If the player is playing as the above ^ They will see the notif. I like it personally for everyone to see it so they can avoid danger zones for example :slight_smile: Broadcast it as news :slight_smile:

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.

Sweet thanks for sharing this :slight_smile:

This seems to not be working for esx

^^ agreed with him not working for esx

What ESX and Essentialmode version do you guys use?
@goufbam @XDRONE

here esx version
esx_outlaw

Cheers tanbomxp! works like charm man thanks!

how to create a group of police officer

Hello,
Does this work for the latest FiveM update? Cause I get an error “couldnt load resource 911: alert”

Has anyone got this script working to create a notification if a person steals a stationary vehicle (i.e. smashing a window getting in). It doesn’t work by default and as im new to LUA in trying to do it myself. If anyone has successfully done it though helppls. :smiley:

does anyone know how to change the language to english?

Do you have some idea when this will work with EssentialMode?

Do you have updated version for esx_outlawalert cuz when I click on the link you replied with in the Simple Outlaw alert Topic. doesnt work.

Anyone have a release that works with vRP?

Anyone have a VRP release, none of this works