[Release] Custom Head Labels

Hello, I am here today to release a modified name overhead script, initially created by @MrDaGree, you can find the initial release here: [Release] Changed Player Name Tags & Distance Names and yes, I did get permission from him to release this.
So, you may be asking what is changed in the release. Well, first I have changed the overall look of the tag. Adding on to this when people talk it displays under their head “Talking…”, you can find screenshots below.

Download

The latest stable download can be found on GitHub.

You can also browse different branches on the repo which may include changes that have not been pushed to production – likely buggy and haven’t been tested thoroughly.


Installation
  1. Navigate to your servers ‘resources’ folder, then drag the hlabels folders from the rar into your ‘resources’ folder.
  2. Go to your ‘server.cfg’ and add under your resources: ‘start hlabels’.
  3. Join your server and enjoy!
Screenshots

Not talking.


Talking.

Features
  • Commands which can be found in s_hlabel.lua in the EssentialMode version, these commands are also permission based. In the non-EssentialMode version they can be found in the c_hlabel.lua. These commands are:
    • /hlrange c - This sets the range of the headlabels to 15
    • /hlrange m - This sets the range of the headlabels to 200
    • /hlrange f - This sets the range of the headlabels so you can see every player.
    • /hl on - This turns headlabels on for yourself.
    • /hl off - This turns headlabels off for yourself.
      In future I will probably add commands for setting other player’s head label range.
      These commands require the command.hlrange ace allowed for a client to use it apart from /hl on and /hl off.
  • Displays when players are talking.
  • Scale of the headlabels stay the same regardless of range.

I hope you guys enjoy this script and suggestions are always welcomed. Any questions just reply to this topic.

11 Likes

Could you also add typing?

I have tried doing this in the past but had no luck but if somebody with a little more experience wants to contribute to this then that would be the only way.

1 Like

Post updated.

- Added Features.
1 Like

Why is /hlon and /hloff not permission based?

As it is only for yourself, not other players. It wouldn’t make sense to have the ability to disable/enable them for people with x permission.

1 Like

I see so anyone can enable that?

Yes, anybody can enable it. But if you want you can change it.

1 Like

I’m also going to make a separate link for non-essentialmode.

1 Like

Got it so i can just set user to superadmin? for enable and disable head labels?

1 Like

Yup.

TriggerEvent('es:addGroupCommand', 'hlon', "user", function(source, name, message)

to

TriggerEvent('es:addGroupCommand', 'hlon', "superadmin", function(source, name, message)

Great release!
possible to change them to the real names? within esx

1 Like

Thanks! Not too familiar with ESX so if you’re wanting that you’ll probably have to do a bit of coding yourself.

1 Like

You could use esx_rpchat as an example for setting a character name overhead rather than a player name.

1 Like

I’ll have a look at it. Do you have a link to it? Can’t seem to find it.

Where can I change the “talking…” position been looking though with no luck.

DrawText3D(x2, y2, z2+1, "~c~" .. GetPlayerServerId(id) .. "  |  " .. string.sub(GetPlayerName(id), 1, 44) .. "~n~~g~Talking...")

this line, just change (x2, y2, z2+1, that should do it.

1 Like

ahhh I was hoping to move just the talking oh well.

I see this as more of an Admin script? Shouldn’t this be permission-based;

Alright, essentialmode is shit and I’m not even looking at it. However, why don’t you just make the commands permission based via ace permission? :man_facepalming:

 RegisterCommand('hlon', function()
	disPlayerNames = 15
end)

Toooo…

 RegisterCommand('hlon', function()
	disPlayerNames = 15
end, true)

Add this to the server.cfg:

add_ace group.groupName command.hlon allow

idk, just seems better with permission rather than anyone using it?

EDIT: Also, wouldn’t this be classed as a re-release? As all you basically did was add “Talking…” under the players name? I mean, I wouldn’t call it a whole new resource just for that? Just a thought. It’s a good idea though.

Sounds good, might try that.