RegisterNetEvent('esx_outlawalert:drugInProgress')
AddEventHandler('esx_outlawalert:drugInProgress', function(targetCoords)
if isPlayerWhitelisted then
if Config.DrugSale then
local alpha = 250
local drugBlip = AddBlipForRadius(targetCoords.x, targetCoords.y, targetCoords.z, Config.DrugSaleRadius)
while alpha ~= 0 do
Citizen.Wait(Config.DrugSaleTime * 4)
alpha = alpha - 1
SetBlipAlpha(drugBlip, alpha)
if alpha == 0 then
RemoveBlip(drugBlip)
return
end
end
end
end
Hello, I am trying to integrate t1ger_drug's npc sell to alert me when they sell. I have this in my Server/main.lua
RegisterServerEvent('esx_outlawalert:drugInProgress') AddEventHandler('esx_outlawalert:drugInProgresss', function(targetCoords, streetName, vehicleLabel, playerGender) mytype = 'police' data = {["code"] = '10-17', ["name"] = 'Drug sales in progress', ["loc"] = streetName} length = 3500 TriggerClientEvent('esx_outlawalert:outlawNotify', -1, mytype, data, length) TriggerClientEvent('esx_outlawalert:drugInProgress', -1, targetCoords) TriggerClientEvent('esx_outlawalert:carJackInProgress', -1, targetCoords) end, false)
This is in my client/main.lua
RegisterNetEvent('esx_outlawalert:drugInProgress') AddEventHandler('esx_outlawalert:drugInProgress', function(targetCoords) if isPlayerWhitelisted then if Config.DrugSale then local alpha = 250 local drugBlip = AddBlipForRadius(targetCoords.x, targetCoords.y, targetCoords.z, Config.DrugSaleRadius)
SetBlipHighDetail(drugBlip, true) SetBlipColour(drugBlip, 1) SetBlipAlpha(drugBlip, alpha) SetBlipAsShortRange(drugBlip, true)
end)
It is not working, any ideas??