I am trying to code a custom HUD, but I don't think the hook is working. Here are the hooks.
[code]
hook.Add( "HUDPaint", "PaintOurHud", HUDPaint );
[/code]
[code]
hook.Add("HUDShouldDraw", "HideOurHud", hidehud)
[/code]
Also, what would the coordinates be for the center of the screen?
Those hooks seem fine just make sure there's no error
[lua]function MyAwesomeHUD()
end
hook.Add( "HUDPaint", "Ermagerd", MyAwesomeHUD )[/lua]
To get the coordinates of the center of the screen is pretty easy, just some math.
ScrW() / 2, ScrH() / 2
[QUOTE=McDunkable;38507304]Those hooks seem fine just make sure there's no error
[lua]function MyAwesomeHUD()
end
hook.Add( "HUDPaint", "Ermagerd", MyAwesomeHUD )[/lua]
To get the coordinates of the center of the screen is pretty easy, just some math.
ScrW() / 2, ScrH() / 2[/QUOTE]
Thanks about the coordinates. However, theres no errors, but it won't work! :(
Are you sure you're drawing these in cl_init or any client side file? If so, I'll take a look into it tomorrow since I'm kind of a in a hurry now, good night.
[QUOTE=McDunkable;38507951]Are you sure you're drawing these in cl_init or any client side file? If so, I'll take a look into it tomorrow since I'm kind of a in a hurry now, good night.[/QUOTE]
I did AddCSLuaFile("lua/vgui/hud.lua"). It may not be related, but my server also gets this error:
Couldn't Load Init Script: '*****/gamemode/init.lua'
Sorry, you need to Log In to post a reply to this thread.