summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2015-02-04 18:42:40 +0100
committerWuzzy <almikes@aol.com>2015-02-04 18:42:40 +0100
commitd67a97011ba0c4511af926105d11273685743fec (patch)
tree23b3cebea59ed40f3740c4b3468aa1930fff9ae8
parent563db9cb4caeb5a3c936894f728f4a9c6636a172 (diff)
Fix bug preventing change of custom HUD bars
-rw-r--r--init.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/init.lua b/init.lua
index 9184349..895fab2 100644
--- a/init.lua
+++ b/init.lua
@@ -82,6 +82,7 @@ function hud.register_hudbar(identifier, text_color, label, use_icon, default_st
if start_max == nil then start_max = default_start_max end
local ids = {}
local state = {}
+ local name = player:get_player_name()
ids.bg = player:hud_add({
hud_elem_type = "image",
position = pos,
@@ -121,8 +122,8 @@ function hud.register_hudbar(identifier, text_color, label, use_icon, default_st
state.value = start_value
state.max = start_max
- hud.hudtables[identifier].hudids = ids
- hud.hudtables[identifier].hudstate = state
+ hud.hudtables[identifier].hudids[name] = ids
+ hud.hudtables[identifier].hudstate[name] = state
end
hudtable.identifier = identifier