Hello. I created a script for blips. I want, this bllips work only for job “elektryk”.
I have this:
ESX = nil
local PlayerData = {}
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(0)
end
end)
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
local ped = PlayerPedId()
if PlayerData.job ~= nil and PlayerData.job.name == 'elektryk' and not IsEntityDead( ped ) then
local blip1 = AddBlipForCoord(728.08, 132.31, 79.96)
SetBlipSprite(blip1, 106) --ikonka blipa
SetBlipColour(blip1, 18) --kolor blipa
BeginTextCommandSetBlipName("STRING")
AddTextComponentString("Elektrownia")
EndTextCommandSetBlipName(blip1)
end
end
end)
but it will not work. No errors at F8.