|
@ -99,6 +99,7 @@ end)
|
|||
arena_lib.on_time_tick("murder", function(arena)
|
||||
for pl_name, _ in pairs(arena.players) do
|
||||
murder.update_HUD(pl_name, "timer_ID", arena.current_time)
|
||||
murder.update_HUD(pl_name, "pl_counter", arena.players_amount)
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
28
hud.lua
|
@ -33,6 +33,30 @@ function murder.generate_HUD(arena, pl_name)
|
|||
z_index = 100,
|
||||
})
|
||||
|
||||
-- Sets the player counter bg.
|
||||
pl_counter_bg = player:hud_add({
|
||||
hud_elem_type = "image",
|
||||
position = {x = 1, y = 0},
|
||||
offset = {x = -99, y = 72},
|
||||
text = "HUD_murder_players_counter.png",
|
||||
alignment = { x = 1.0},
|
||||
scale = { x = 2, y = 2},
|
||||
number = 0xFFFFFF,
|
||||
z_index = 100
|
||||
})
|
||||
|
||||
-- Sets the player counter text.
|
||||
pl_counter = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
position = {x = 1, y = 0},
|
||||
offset = {x = -89, y = 75},
|
||||
text = arena.players_amount,
|
||||
alignment = { x = 1.0},
|
||||
scale = { x = 2, y = 2},
|
||||
number = 0xFFFFFF,
|
||||
z_index = 100,
|
||||
})
|
||||
|
||||
-- Sets the role text.
|
||||
role = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
|
@ -61,7 +85,9 @@ function murder.generate_HUD(arena, pl_name)
|
|||
role_ID = role,
|
||||
backgound_ID = background,
|
||||
timer_ID = timer,
|
||||
vignette_ID = vignette
|
||||
vignette_ID = vignette,
|
||||
pl_counter_bg = pl_counter_bg,
|
||||
pl_counter = pl_counter
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Before Width: | Height: | Size: 657 B After Width: | Height: | Size: 699 B |
After Width: | Height: | Size: 455 B |
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 164 B After Width: | Height: | Size: 162 B |