ENT.Type = "anim" ENT.Base = "base_gmodentity" ENT.PrintName = "" ENT.Author = "" ENT.Contact = "" ENT.Purpose = "" ENT.Instructions = "" // Set the key function ENT:SetEntityKey(Key) self.Entity:SetVar("Numpad", Key) end // Get the key function ENT:GetEntityKey() return self.Entity:GetVar("Numpad") end // Set length function ENT:SetEntityLength(Len) self.Entity:SetNetworkedInt("Len", Len) end // Get length function ENT:GetEntityLength() return self.Entity:GetNetworkedInt("Len") end // Set button on function ENT:SetEntityPressing(Bool) self.Entity:SetNetworkedBool("Pressing", Bool, true) end // Check if it's on function ENT:IsEntityPressing() return self.Entity:GetNetworkedBool("Pressing") end // Set label function ENT:SetEntityLabel(Text) local Label = "" if (Text != "") then Label = "\nLabel: "..Text end local Inversed = "\nInversed: "..self.Entity.Inversed local Len = "\nLength: "..self:GetEntityLength() local Status = "(ON)" if not (self:IsEntityPressing()) then Status = "(OFF)" end Text = "Sensor "..Status..Len..Inversed..Label self:SetOverlayText(Text) end // Get label function ENT:GetEntityLabel() self.Entity:GetVar("Label", "") end // Get player function ENT:GetEntityPlayer() return self.Entity:GetVar("Founder", NULL) end // Get player index function ENT:GetEntityIndex() return self.Entity:GetVar("FounderIndex", 0) end