Adding a velocity hud element to the fretta hud for a new gamemode :?
1 replies, posted
Hello I am fixing up this old gamemode to put it up on a new server and im using fretta13 the main hud code is this
[code]
function GM:UpdateHUD_Alive( InRound )
if ( GAMEMODE.RoundBased ) then
local RoundNumber = vgui.Create( "DHudUpdater" );
RoundNumber:SizeToContents()
RoundNumber:SetValueFunction( function() return GetGlobalInt( "RoundNumber", 0 ) end )
RoundNumber:SetLabel( "ROUND" )
Bar:AddItem( RoundNumber )
local RoundTimer = vgui.Create( "DHudCountdown" );
RoundTimer:SizeToContents()
RoundTimer:SetValueFunction( function()
if ( GetGlobalFloat( "RoundStartTime", 0 ) > CurTime() ) then return GetGlobalFloat( "RoundStartTime", 0 ) end
return GetGlobalFloat( "RoundEndTime" ) end )
RoundTimer:SetLabel( "TIME" )
Bar:AddItem( RoundTimer )
end
end
end
[/code]
that just creates the time left on the screen tried using the same thing to add a velocity hud but i got nothing i think it was the code i put can anyone assist me in adding the velocity ?
[editline]8th July 2015[/editline]
Okay let me change it is there any way to add in a velocity bar?
Anything bruh?
Sorry, you need to Log In to post a reply to this thread.