function createBlip(id)
ped = GetPlayerPed(id)
lastUnit = GetVehiclePedIsIn(GetPlayerPed(id), true)
blip = GetBlipFromEntity(lastUnit)
if not DoesBlipExist(blip) then -- Add blip and create head display on player
if IsPedInAnyVehicle(ped) and GetPedInVehicleSeat(lastUnit, -1) == ped then
blip = AddBlipForEntity(lastUnit)
SetBlipSprite(blip, 225) -- Blip Sprite
SetBlipColour(blip, 1)
Citizen.InvokeNative(0x5FBCA48327B914DF, blip, true) -- Player Blip indicator
SetBlipRotation(blip, math.ceil(GetEntityHeading(veh))) -- update rotation
SetBlipNameToPlayerName(blip, id) -- update blip name
SetBlipScale(blip, 0.85) -- set scale
SetBlipAsShortRange(blip, true)
table.insert(blipsCops, blip) -- add blip to array so we can remove it later
end
end
end
Here is my function to create a blip. I can’t seem to figure out why the blip is removed from the map after you get a certain distance away. The end goal here is that players can see this blip from anywhere on the map, regardless of how far away from it they are.
Any help would be much appreciated. I tried to find blip documentation in regards to: SetBlipAsShortRange(blip, true)
but there does not seem to be much available.