So I’ve been searching and thinking about making a script that would be pretty handy for my server, but since the fact I’m new to LUA. I really don’t know how to get started.
To make my explanation a bit easier I will do it with an example:
I want to make a script that check’s which job u have. And if you have for example the police job, you are able to see the playerblips of everyone who has the same job. But noone else.
i found this on esx_policejob not my code but here it is anyways and you can find the rest on their github`function createBlip(id)
local ped = GetPlayerPed(id)
local blip = GetBlipFromEntity(ped)
if not DoesBlipExist(blip) then -- Add blip and create head display on player
blip = AddBlipForEntity(ped)
SetBlipSprite(blip, 1)
ShowHeadingIndicatorOnBlip(blip, true) -- Player Blip indicator
SetBlipRotation(blip, math.ceil(GetEntityHeading(ped))) -- 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`