summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2015-02-09 22:51:35 +0100
committerWuzzy <almikes@aol.com>2015-02-09 22:51:35 +0100
commit71f15d3763c41f6eec37378341efacdb2f992678 (patch)
tree4ebdc4eeb91e596013138ac37f10b1d0bb6808e6
parent55dc460d42458f7543e552bb18a55e3455654e70 (diff)
Add proper function to initialize HUD bar
-rw-r--r--init.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index e63956f..c6ac921 100644
--- a/init.lua
+++ b/init.lua
@@ -151,6 +151,10 @@ function hud.register_hudbar(identifier, text_color, label, textures, default_st
hud.hudtables[identifier] = hudtable
end
+function hud.init_hudbar(player, identifier, start_value, start_max)
+ hud.hudtables[identifier].add_all(player, start_value, start_max)
+end
+
function hud.change_hudbar(player, identifier, new_value, new_max_value)
local name = player:get_player_name()
local hudtable = hud.get_hudtable(identifier)