Citizen.CreateThread(function()
while true do
Wait( 1 )
-- show blips
for id = 0, 32 do
if NetworkIsPlayerActive( id ) then -- and GetPlayerPed( id ) ~= GetPlayerPed( -1 )
ped = GetPlayerPed( id )
--blip = GetBlipFromEntity( ped )
-- HEAD DISPLAY STUFF --
-- Create head display (this is safe to be spammed)
if GetPlayerPed( id ) ~= GetPlayerPed( -1 ) then
headDisplayId = SetMpGamerTagVisibility(ped, "tonumber(GetPlayerId)", false, false, "", false )
end
if (GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), GetEntityCoords(GetPlayerPed(id))) < 30.0001) and HasEntityClearLosToEntity(GetPlayerPed(-1), GetPlayerPed(id), 17) then
SetMpGamerTagVisibility(headDisplayId, 9, true)
SetMpGamerTagAlpha(headDisplayId, 9, 255)
else
SetMpGamerTagVisibility(headDisplayId, 0, false)
end
if NetworkIsPlayerTalking(id) then
SetMpGamerTagVisibility(headDisplayId, 9, true) -- Speaker
SetMpGamerTagAlpha(headDisplayId, 9, 255) -- Alpha
else
SetMpGamerTagAlpha(headDisplayId, 9, false) -- Speaker Off
end
end
end
end
end)
Now it looks like that, my problem is actually the code to get it to display the user id instead of what I have written in the quotes…
headDisplayId = SetMpGamerTagVisibility(ped, “tonumber(GetPlayerId)”, false, false, “”, false )
^ how do I get that line to pull the user’s id and display it above their head? As it sits right now it just says “tonumber” above everyone’s head. There’s something wrong with the syntax in that line, but I’m not exactly sure how it should be written.