I figured maybe the native.lua was getting updated or something because it’s always right after there’s a FiveM client update and only after an update so I think it has to do with that somehow.
And yeah, it’s used to display player IDs above them.
while true do
for id = 0, 32 do
if (NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= GetPlayerPed(-1)) then
local tCoords = GetEntityCoords(GetPlayerPed(id), true)
DrawText3D(tCoords.x, tCoords.y, tCoords.z+1.0, "" .. GetPlayerServerId(id), 255, 255, 255, 255)
function DrawText3D(x, y, z, text, r, g, b, alpha)
local onScreen, _x, _y = GetScreenCoordFromWorldCoord(x,y,z)
if not onScreen then
SetTextColour(r, g, b, alpha)
This is stripped down but should still work. As you can see, for it to work correctly, it needs to be if not onScreen and every once in a while after a client update, I’ll have to add or remove the not.
It was working fine yesterday with if onScreen and after today’s update I had to add not. Done this many times so I always know how to fix it.
Again, it’s minor but an annoyance when it identifies players.