Hello,
I have recently published a HUD on GitHub but I am having a problem that arised around a month ago. Quite a while ago, I published this thread asking how to make the players avatar appear in a HUD. In that post, the last solution worked perfectly until a month ago as stated.
I have tried it on a separate script to make sure it wasn't any script updates messing around with it but it seems not. I have tried validating the game on steam, changing settings, etc.. but nothing has worked so far.
The solution that I had from the old thread was this:
-- Make a hook that scans for when LocalPlayer() is active
hook.Add("OnEntityCreated", "LocalPlayerCreate", function(pl) -- first Entity is LocalPlayer
hook.Remove("OnEntityCreated","LocalPlayerCreate") -- Call this hook once
-- Display avatar (here LocalPlayer() return is valid player)
local Avatar = vgui.Create("AvatarImage")
Avatar:SetSize(72,72)
Avatar:SetPos(27.5,ScrH()-142)
Avatar:SetPlayer(LocalPlayer(),64)
end)
and as stated before, it stopped working. It is using the vgui method & I am wondering if a game update has caused this. This script has always been running in the: "Garry's Mod/garrysmod/lua/autorun/client/" directory.
~ Thanks in advance, Owez.
Thank you, it worked! Here is your bounty
Sorry, you need to Log In to post a reply to this thread.