Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Question Blips question - Hide Blips for other Players

Skaar2204

Member
Joined
Sep 7, 2021
Messages
3
Reaction score
2
Points
156
Location
Deutschland
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
 

EzDev

Bronze Elite
Joined
Dec 10, 2022
Messages
8
Reaction score
5
Points
156
Location
Fr
Website
ezdev-fivem-scripts.tebex.io
if you want to fix your script, register esx in firsts lines and add ESX. front of PlayerData.job.name like to ESX.PlayerData.job.name and add the two function front of Data.job.name

like this :
if ESX.PlayerData.job and ESX.PlayerData.job.name and ESX.PlayerData.job.name == 'pizza' then

and for grade
if ESX.PlayerData.job and ESX.PlayerData.job.name and ESX.PlayerData.job.name == 'pizza' and ESX.PlayerData.job.grade == 'boss' then

:D
 
Top