Probleme drawHud on entities

Hello, i have a little problem with a HUD, because when i press the E key, the message text appear for all players, but i only want for the guy who push the key, could you help me? Thanks


include("shared.lua")


function ENT:Initialize()
        hook.Add( "HUDPaint", self, self.DrawHUD)
end

function ENT:DrawHUD()
    self.NextDotsTime = CurTime() + 0.5
	  if self.NextDotsTime and CurTime() >= self.NextDotsTime then
        self.NextDotsTime = CurTime() + 0.5
        self.Dots = self.Dots or ""
        local len = string.len(self.Dots)
        local dots = {
            [0] = ".",
            [1] = "..",
            [2] = "...",
            [3] = ""
        }
        self.Dots = dots[len]
      end

if self:GetIsloot() == true then
	    self.Dots = self.Dots or ""
        local w = ScrW()
        local h = ScrH()
        local x, y, width, height = w / 2 - w / 10, h / 2, w / 5, h / 15
        local time = self:GetEndCheckTime() - self:GetStartCheckTime()
        local curtime = CurTime() - self:GetStartCheckTime()
        local status =	math.Clamp(curtime / time, 0, 1)	
        local BarWidth = status * (width - 16)
        local cornerRadius = math.Min(8, BarWidth / 3 * 2 - BarWidth / 3 * 2 % 2)

        draw.RoundedBox(8, x, y, width, height, Color(10, 10, 10, 120))
        draw.RoundedBox(cornerRadius, x + 8, y + 8, BarWidth, height - 16, Color(0, 0 + (status * 255), 255 - (status * 255), 255))
        draw.DrawNonParsedSimpleText("Recherche" .. self.Dots, "Trebuchet24", w / 2, y + height / 2, Color(255, 255, 255, 255), 1, 1)
end
end


ENT:Use
You need to draw the text for the caller.

Instead of putting a DTVar thats global just network to the player that’s using the entity that he is using it, and network once more when he isn’t using it. That would be what i’d do.
And add some security checks/timers as well to always send the net end message or to not draw the thing as it may get bugged by some sort of action or something.

i think DTVar don’t works anyways because i’ve got lua errors : (a nil value) when i want to set variables

[ERROR] gamemodes/darkrp/entities/entities/entity_loot/init.lua:64: attempt to call method ‘SetEndCheckTime’ (a nil value)

  1. unknown - gamemodes/darkrp/entities/entities/entity_loot/init.lua:64