danny3tb / danny3_outlawalert

MIT License
6 stars 15 forks source link

Not an Issue but a request - T1GER_Drugs #7

Open CollapsedLegacy opened 3 years ago

CollapsedLegacy commented 3 years ago

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)

        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

end)

It is not working, any ideas??

CollapsedLegacy commented 3 years ago

If anyone could respond ASAP I would really appreciate it.