So i am trying to create a new map, one that the player will use once opens with a key (in this case F5 one). The map opens and mouse pointer runs on it but no blips are not being added to it, however when checking the default minimap and/or the ESQ big map (the blips are show there).
I am doing anything wrong when trying to add blips to a newly map ?
local state = false
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if state then
controls(true)
SetMouseCursorActiveThisFrame()
else
controls(false)
end
if IsControlJustReleased( 0, 167) then
GetVehicles()
end
if IsControlJustReleased( 0, 166) then
if state then
SetMapFullScreen(false, false)
state = false
print("Big map is now close");
else
SetMapFullScreen(true, true)
SetRadarZoom(1000)
state = true
print("Big map is now open");
SetMouseCursorSprite(1)
AddTextEntry('testBlip', Car at ~a~!')
local ped = PlayerPedId()
local pedLoc = GetEntityCoords(ped)
local blip = AddBlipForCoord(pedLoc.x, pedLoc.y, 0.0)
SetBlipSprite(blip, 227)
AddBlipForEntity(ped)
BeginTextCommandSetBlipName('testBlip')
AddTextComponentSubstringPlayerName('me')
EndTextCommandSetBlipName(blip)
end
end
end
end)
function controls(state)
local func = state and DisableControlAction or EnableControlAction
func(0, 245, true) -- LookLeftRight
func(0, 309, true) -- LookLeftRight
func(0, 1, true) -- Disable pan
func(0, 2, true) -- Disable tilt
func(0, 24, true) -- Attack
func(0, 257, true) -- Attack 2
func(0, 25, true) -- Aim
func(0, 263, true) -- Melee Attack 1
func(0, 32, true) -- W
func(0, 34, true) -- A
func(0, 31, true) -- S
func(0, 30, true) -- D
end
Thank in advance