Skaar2204
Member
I will hide 2 Blips for player with not this job...
-- blips shop --
local blips = {
-- Example {title="", colour=, id=, x=, y=, z=},
{title="Pizza pate", colour=59, id=103, x = 28.26, y = -1769.37, z = 28.49},
{title="Pizza ingredients", colour=59, id=103, x = 378.57, y = 327.33, z = 102.40}
}
Citizen.CreateThread(function()
if PlayerData.job.name == 'pizza'
for _, info in pairs(blips) do
info.blip = AddBlipForCoord(info.x, info.y, info.z)
SetBlipSprite(info.blip, info.id)
SetBlipDisplay(info.blip, 4)
SetBlipScale(info.blip, 1.0)
SetBlipColour(info.blip, info.colour)
SetBlipAsShortRange(info.blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(info.title)
EndTextCommandSetBlipName(info.blip)
end
end)
If I enter if PlayerData.job.name == 'pizza' the script no longer says that there is an error with jobs .. I'm testing a lot but I have no idea. Anyone have an idea?
thanks
-- blips shop --
local blips = {
-- Example {title="", colour=, id=, x=, y=, z=},
{title="Pizza pate", colour=59, id=103, x = 28.26, y = -1769.37, z = 28.49},
{title="Pizza ingredients", colour=59, id=103, x = 378.57, y = 327.33, z = 102.40}
}
Citizen.CreateThread(function()
if PlayerData.job.name == 'pizza'
for _, info in pairs(blips) do
info.blip = AddBlipForCoord(info.x, info.y, info.z)
SetBlipSprite(info.blip, info.id)
SetBlipDisplay(info.blip, 4)
SetBlipScale(info.blip, 1.0)
SetBlipColour(info.blip, info.colour)
SetBlipAsShortRange(info.blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(info.title)
EndTextCommandSetBlipName(info.blip)
end
end)
If I enter if PlayerData.job.name == 'pizza' the script no longer says that there is an error with jobs .. I'm testing a lot but I have no idea. Anyone have an idea?