How to use HUD API?
That doesn't work.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
player:hud_add({
hud_elem_type = "statbar",
position = {x=0,y=1},
size = "",
text = "ui_heart_bg.png",
number = 20,
alignment = {x=0,y=1},
offset = {x=0, y=-32},
})
health_hud[name] = player:hud_add({
hud_elem_type = "statbar",
position = {x=0,y=1},
size = "",
text = "ui_heart_fg.png",
number = player:get_hp(),
alignment = {x=0,y=1},
offset = {x=0, y=-32},
})
