• Hide HUD if player is cloacked
    13 replies, posted
Hello; i own RocketMania HUD and he gave me a code to hide HUD if player is cloacked. I changed my HUD to TCB Premium HUD and i pasted the code where TCB told me to past, but it's not working. Here's the code if ply:GetMaterial() == "models/effects/vol_light001" then return end Is it the good way to do it?
Where are you putting that code?
Before local function HUDPaint() I also tryed after local function HUDPaint()
[QUOTE=JauneFra;47737357]Before local function HUDPaint() I also tryed after local function HUDPaint()[/QUOTE] Okay so what you want to do is put the code after the validity checks in the HUDPaint function ( if there are any )
What i want to do is hide the HUD when the player is cloacked
[CODE] local function HUDPaint() if ply:GetMaterial() == "models/effects/vol_light001" then return end -- Above the rest [/CODE]
[QUOTE=mindfulhacker;47737667][CODE] local function HUDPaint() if ply:GetMaterial() == "models/effects/vol_light001" then return end -- Above the rest [/CODE][/QUOTE] Thanks, but already tryed, isn't working
[QUOTE=JauneFra;47737674]Thanks, but already tryed, isn't working[/QUOTE] What's ply? Are you getting an error in the console saying that ply isn't defined? [lua] local function HUDPaint() if LocalPlayer():GetMaterial() == "models/effects/vol_light001" then return end [/lua]
[QUOTE=Coffeee;47737737]What's ply? Are you getting an error in the console saying that ply isn't defined? [lua] local function HUDPaint() if LocalPlayer():GetMaterial() == "models/effects/vol_light001" then return end [/lua][/QUOTE] Yes
Then why didnt you say so? Thats infinitely more helpful than "its not working"
[QUOTE=JauneFra;47737741]Yes[/QUOTE] And does the code that I provided work? :v:
[QUOTE=Coffeee;47737944]And does the code that I provided work? :v:[/QUOTE] I'll try asap :D
[QUOTE=Coffeee;47737944]And does the code that I provided work? :v:[/QUOTE] There is no error, but the hud is still here
[QUOTE=JauneFra;47741457]There is no error, but the hud is still here[/QUOTE] Add prints to make sure the code is being ran
Sorry, you need to Log In to post a reply to this thread.