Hello gentlemen ... I am using "Vgui.Create" to put an avatar on the hud ... But I get the fun surprise that picture, no matter what you do ... Do not go away ... Why?
Able to make the HUD desaparesca simply placing "ply: IsAlive ()" which checks, if false, it disappears, but the avatar image disappears ... They could tell me what should I do?
The same happens with the "Dimage"
Part of the code
[Lua]
if killer_ply:IsPlayer() then
if killer_ply:IsBot() then
if not ply:Alive() then
bot = vgui.Create( "DImage" )
bot:SetImage( "gui/silkicons/user" )
bot:SetSize( 32, 32 )
bot:SetPos( 10, 10 )
bot:SetImageColor( Color( 255, 255, 255, 255 ) )
end
else
if not ply:Alive() then
local av = vgui.Create("AvatarImage")
av:SetPos(50,50)
av:SetSize(32, 32)
av:SetPlayer( killer_ply, 32 )
end
end
end [/LUA]
VguiObject:Remove()
[QUOTE=James xX;34649031]VguiObject:Remove()[/QUOTE]
Doesn't work, still here,may be i've put it on a wrong line,because it broke my code and the avatar still on the left corner
Sorry, you need to Log In to post a reply to this thread.