Pizza
Member
Hud won't load
Code:
local client
local p_startseg
local p_onseg
local p_offseg
local p_endseg
local p_ki
local function kihud(v, player)
client = player
if player.mo and player.mo.skin == "songoku"
local kipower = 0
local kimax = 0
local kidrain = 0
if player.kimeter == nil
return
end
kipower = $1 + 80
kimax = $1 + player.kimeter
kidrain = $1 + player.kimeter+1
local p_startseg = v.cachePatch("KIGAUGE")
local p_onseg = v.cachePatch("KIGAUGE3")
local p_offseg = v.cachePatch("KIGAUGE4")
local p_endseg = v.cachePatch("KIGAUGE2")
local p_ki = v.cachePatch("KI")
local posx = 130
local posy = 0
posy = 155
else
posy = 174
end
-- Ending segment first
v.draw(posx, posy, p_endseg, V_SNAPTOTOP|V_SNAPTORIGHT|V_HUDTRANS)
posx = $1 - 1
-- Step through backwards, to match the way we're drawing.
for i = kimax, 1, -1
if kipower >= i
v.draw(posx, posy, p_onseg, V_SNAPTOTOP|V_SNAPTORIGHT|V_HUDTRANS)
else
v.draw(posx, posy, p_offseg, V_SNAPTOTOP|V_SNAPTORIGHT|V_HUDTRANS)
end
posx = $1 - 8;
end
-- Start segment and BOSS text
v.draw(posx, posy, p_startseg, V_SNAPTOTOP|V_SNAPTORIGHT|V_HUDTRANS)
v.draw(posx, posy, p_ki, V_SNAPTOTOP|V_SNAPTORIGHT|V_HUDTRANS);
return
end
return
end
hud.add(kihud)