QB-Core Police Player Blips on MAp Deactivate

Hi,

First of i ist QB-Core Not ESX

I cant find the Option to disable the Player blip on map for the Police Job i dont want Them to See Them on the map i dont know it distroes the Roleplay i Guss Maybe someone noes how i Can disable it or give me a hint

Firstly, Go into qb-policejob > server > main.lua

Change line 13 - 42 from:

local function CreateDutyBlips(playerId, playerLabel, playerJob, playerLocation)
    local ped = GetPlayerPed(playerId)
    local blip = GetBlipFromEntity(ped)
    if not DoesBlipExist(blip) then
        if NetworkIsPlayerActive(playerId) then
            blip = AddBlipForEntity(ped)
        else
            blip = AddBlipForCoord(playerLocation.x, playerLocation.y, playerLocation.z)
        end
        SetBlipSprite(blip, 1)
        ShowHeadingIndicatorOnBlip(blip, true)
        SetBlipRotation(blip, math.ceil(playerLocation.w))
        SetBlipScale(blip, 1.0)
        if playerJob == "police" then
            SetBlipColour(blip, 38)
        else
            SetBlipColour(blip, 5)
        end
        SetBlipAsShortRange(blip, true)
        BeginTextCommandSetBlipName('STRING')
        AddTextComponentString(playerLabel)
        EndTextCommandSetBlipName(blip)
        DutyBlips[#DutyBlips+1] = blip
    end

    if GetBlipFromEntity(PlayerPedId()) == blip then
        -- Ensure we remove our own blip.
        RemoveBlip(blip)
    end
end

To:

--local function CreateDutyBlips(playerId, playerLabel, playerJob, playerLocation)
--    local ped = GetPlayerPed(playerId)
--    local blip = GetBlipFromEntity(ped)
--    if not DoesBlipExist(blip) then
--        if NetworkIsPlayerActive(playerId) then
--            blip = AddBlipForEntity(ped)
--        else
--            blip = AddBlipForCoord(playerLocation.x, playerLocation.y, playerLocation.z)
--        end
--        SetBlipSprite(blip, 1)
--        ShowHeadingIndicatorOnBlip(blip, true)
--        SetBlipRotation(blip, math.ceil(playerLocation.w))
--        SetBlipScale(blip, 1.0)
--        if playerJob == "police" then
--            SetBlipColour(blip, 38)
--        else
--            SetBlipColour(blip, 5)
--        end
--        SetBlipAsShortRange(blip, true)
--        BeginTextCommandSetBlipName('STRING')
--        AddTextComponentString(playerLabel)
--        EndTextCommandSetBlipName(blip)
--        DutyBlips[#DutyBlips+1] = blip
--    end
--
--    if GetBlipFromEntity(PlayerPedId()) == blip then
--        -- Ensure we remove our own blip.
--        RemoveBlip(blip)
--    end
--end

looks not the same as in or script lul

-- Functions
--[[
local function UpdateBlips()
    local dutyPlayers = {}
    local players = QBCore.Functions.GetQBPlayers()
    for k, v in pairs(players) do
        if (v.PlayerData.job.name == "police" or v.PlayerData.job.name == "ambulance") and v.PlayerData.job.onduty then
            local coords = GetEntityCoords(GetPlayerPed(v.PlayerData.source))
            local heading = GetEntityHeading(GetPlayerPed(v.PlayerData.source))
            dutyPlayers[#dutyPlayers+1] = {
                source = v.PlayerData.source,
                label = v.PlayerData.metadata["callsign"],
                job = v.PlayerData.job.name,
                location = {
                    x = coords.x,
                    y = coords.y,
                    z = coords.z,
                    w = heading
                }
            }
        end
    end
    TriggerClientEvent("police:client:UpdateBlips", -1, dutyPlayers)
end
]]
local function CreateBloodId()
    if BloodDrops then
        local bloodId = math.random(10000, 99999)
        while BloodDrops[bloodId] do
            bloodId = math.random(10000, 99999)
        end
        return bloodId
    else
        local bloodId = math.random(10000, 99999)
        return bloodId
    end
end

Are you sure you are in qb-policejob, server folder then main.lua?

This is what the folder location should look like:

on my itwas in client lua lul

No worries, Hope you get it sorted!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.