Queria saber como fazer esse sistema mostrado aqui nesse tópico:
https://www.aldeiarpg.com/t12786-mostrando-classe-do-player-na-tela-inicial
Achei a sub DrawGUIBars, porém a linha Render HP Bar deve ter outro nome como "health bar"
Podem me ajudar a montar?
https://www.aldeiarpg.com/t12786-mostrando-classe-do-player-na-tela-inicial
- Código:
Public Sub DrawGUIBars()
Dim tmpWidth As Long, barWidth As Long, x As Long, y As Long, dX As Long, dY As Long, sString As String
Dim Width As Long, Height As Long
' backwindow + empty bars
x = GUIWindow(GUI_BARS).x
y = GUIWindow(GUI_BARS).y
Width = 254
Height = 86
'EngineRenderRectangle Tex_GUI(4), x, y, 0, 0, width, height, width, height, width, height
RenderTexture Tex_GUI(4), x, y, 0, 0, Width, Height, Width, Height
' hardcoded for POT textures
barWidth = 120
' health bar
BarWidth_GuiHP_Max = ((GetPlayerVital(MyIndex, Vitals.HP) / barWidth) / (GetPlayerMaxVital(MyIndex, Vitals.HP) / barWidth)) * barWidth
RenderTexture Tex_GUI(13), x + 94, y + 12, 0, 0, BarWidth_GuiHP, Tex_GUI(13).Height, BarWidth_GuiHP, Tex_GUI(13).Height
' render health
sString = GetPlayerVital(MyIndex, Vitals.HP) & "/" & GetPlayerMaxVital(MyIndex, Vitals.HP)
dX = 95 + 7 + (barWidth / 2) - (EngineGetTextWidth(Font_Default, sString) / 2)
dY = y + 9
RenderText Font_Default, sString, dX, dY, White
Achei a sub DrawGUIBars, porém a linha Render HP Bar deve ter outro nome como "health bar"
Podem me ajudar a montar?