Dispatch

  • In client/editable/dispatch.lua you can add your own dispatch function, there's 3 different alerts based on what the player has triggered while inside the house:

    • door: Triggered when the player fails to lockpick the entry, this will be randomly triggered when failing the minigame to avoid any spam.

    • alarm: Triggered when the player fails to hack the alarm.

    • noise: If the player makes enough noise, cops will receive a call from the neighbors.

function callCops(type,identifier)
    dbug('callCops(type)', type)
    local coords = GetEntityCoords(cache.ped)
    if type == "door" then
        -- Triggered when player fails to lockpick door

    end
    if type == "alarm" then
        -- Triggered when house alarm doesn't get hacked in time

    end
    if type == "noise" then
        -- Triggered when noise bar gets red color

    end
    -- Default dispatch notification and blip
    TriggerServerEvent('av_houserobbery:sendDispatch', coords, type, identifier or currentIdentifier)
end

Last updated