[Release] Custom Head Labels

ararrara

Ran refresh? Show a screenshot of the error also.

it just said couldnt load resource ā€œcustomheadlabelsā€ there was no error other than that

Did you download the resource from the releases section? It should be called ā€˜hlabels’.

Yeah, Ill try it in a min, but what do I do to make it only ID?

We’ll cross that bridge when we come to it. Let’s resolve why you’re unable to start the resource first.

Let me restart my server

The __resource works now

Now paste the line that is drawing the text. It’ll be in c_hlabels.lua or so.

what do you mean? I am confused

I’m not at a desktop atm so can’t really help you further, when I wake up I’ll be able to help if somebody else hasn’t.

This is the ā€œBlock of codeā€ what you’re looking for is in. It’s in hlabels\c_hlabel.lua near the bottom

math.floor(GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()),  GetEntityCoords(GetPlayerPed(id)),  true))
					if distance < disPlayerNames then
						if not ignorePlayerNameDistance then
							if NetworkIsPlayerTalking(id) then
								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) .. "  |  " .. string.sub(GetPlayerName(id), 1, 44) .. "~n~~g~Talking...")
							else
								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) .. "  |  " .. string.sub(GetPlayerName(id), 1, 44) .. "")
							end
						end
					end

You’ll want to change

								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) .. "  |  " .. string.sub(GetPlayerName(id), 1, 44) .. "~n~~g~Talking...")
							else
								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) .. "  |  " .. string.sub(GetPlayerName(id), 1, 44) .. "")

To:
Colored ID’s

								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, "~n~~g~" .. GetPlayerServerId(id) )
							else
								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) )

Or to:
ā€œTalkingā€

								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) .. "~n~~g~Talking...")
							else
								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) )
1 Like

For me, I can see my own head label over my head, is there a way to disable this?

Edit: Like I said I’m on mobile and I don’t have the full text of the file just went and copied it from my other post so there might be a better spot to check that or that might not be the right spot at all. I’ll double check when I’m home.

math.floor(GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()),  GetEntityCoords(GetPlayerPed(id)),  true))
				if GetPlayerPed(id) ~= GetPlayerPed(-1) then --Add this line and make sure you add an end for it, I'm on mobile so I didn't
					if distance < disPlayerNames then
						if not ignorePlayerNameDistance then
							if NetworkIsPlayerTalking(id) then
								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) .. "  |  " .. string.sub(GetPlayerName(id), 1, 44) .. "~n~~g~Talking...")
							else
								DrawText3D(GetEntityCoords(iPed)["x"], GetEntityCoords(iPed)["y"], GetEntityCoords(iPed)["z"]+1, GetPlayerServerId(id) .. "  |  " .. string.sub(GetPlayerName(id), 1, 44) .. "")

Oh no, it seems you’re running an old version that has this issue. It has been resolved in 1.2, please update.

Changes in v1.34

  • Bug fixes.
    • The core functionality of the script, sadly nobody reported this :frowning: – see commit 575cde9.
  • Added a feature to use Comic Sans MS, thanks IllusiveTea – borrowed this from some old code of yours, hope you don’t mind :wink:
    • This is disabled by default for those wondering.
    • Set comicSans to true if you want this to show on your instance.
  • Some code optimisations, that’s it really.

Nice update! could you make it work with esx_identity? so rp names are displayed instead of steam names? it would be so amazing!

Feel free to make a PR that does this. I’d rather not install ESX.

I edited this for a server I was deving on but it wound up closing. I would have to fix it to work on all servers since that server had a custom framework so I wanna know if anyone would be interested.
Edits:
Defaults- Numbers above heads only when you’re holding up arrow and no circles under feat (to make meta gaming intentional rather than subconscious)
Numbers turn blue when a player is talking
Optional command (/circles) to toggle on/off FamilyRP style circles under feat that turn blue when a player is talking.
Admin toggle command (/showsteam) that adds steam names next to IDs, makes the text larger, able to be seen from further away and shown above heads without the need to hold up arrow.
Added vehicle offsets to accommodate the larger text including for the 5th and 6th seat of vehicles
Removed the the left/right offset for players on motorcycles.
Edit: There’s also a toggle command for showing ā€œTalkingā€¦ā€

Looks great!