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
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
-- 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