diff --git a/core.lua b/core.lua index 4e0e60b..76108e6 100644 --- a/core.lua +++ b/core.lua @@ -124,8 +124,6 @@ cloaking.cloak = function(player) player:set_properties({visual_size = {x = 0, y = 0}, collisionbox = {0,0,0,0,0,0}}) p:set_nametag_attributes({text = " "}) - cloaked_players[victim] = true - local t = nil if areas and areas.hud and areas.hud[victim] then t = areas.hud[victim] @@ -137,6 +135,8 @@ cloaking.cloak = function(player) end end + cloaked_players[victim] = true + if t then areas.hud[victim] = t p:hud_change(areas.hud[victim].areasId, "text", "Cloaked")