DarkRP Entity display

http://forum.darkrp.com/attachments/upload_2017-8-31_23-7-4-png.1192/

Im trying to disable that name tag from appearing, but it doesn’t work. Managed to disable all the other stuff but this one thing just doesn’t want to go.


local hiddenElements = {}
hiddenElements["CHudHealth"] = true
hiddenElements["CHudBattery"] = true
hiddenElements["CHudSuitPower"] = true
hiddenElements["DarkRP_EntityDisplay"] = true
hiddenElements["DarkRP_HUD"] = true
hiddenElements["DarkRP_LocalPlayerHUD"] = true
hiddenElements["DarkRP_Agenda"] = false
hiddenElements["DarkRP_Hungermod"] = true
hiddenElements["CHudAmmo"] = true
hiddenElements["CHudSecondaryAmmo"] = true



function HideDarkRPHUD(name)
    if hiddenElements[name] then
        return false
    else
        return true
    end
end

hook.Add("HUDShouldDraw", "hideDarkRPHUD", HideDarkRPHUD)
 

First off, don’t return true, as that is the default behaviour and it basically makes it so that no hooks run after yours.
Second, The name tag like, when you look at a player and the text that shows on top of their heads?
If so, that element is DarkRP_EntityDisplay

If you want to replace it for a different one, you should instead override this

the green text that says their name and %hp is part of the entitydisplay, which is set to true so it shouldn’t appear.

I know, but according to the code that hook should do it.
Are you sure the code you’ve given us is running CLIENTSIDE?

Yes it’s part of the whole hud, I don’t think it has anything to do with the hud being in the modules folder of the darkrpmodification right?