Skip to content

Replace default police alert

Triggered when police is alerted

Event

RegisterNetEvent("advanced_drugs_creator:alertedPolice", function(coords)

end)

Parameters

Name Data Type Description
coords vector3 Coordinates where a player tried to sell drugs

Example

-- Disables the default police alert
RegisterNetEvent("advanced_drugs_creator:framework:ready", function() 
    exports["advanced_drugs_creator"]:disableScriptEvent("advanced_drugs_creator:alertedPolice")
end)

RegisterNetEvent("advanced_drugs_creator:alertedPolice", function(coords)
    -- Do something
end)

Where to insert the code?

You can place it in the file integrations/cl_integrations.lua of the script, at the bottom of the file on new lines