Custom Powerup help


ITEM.Name = "Zar's Armor"
ITEM.Price = 100000000
ITEM.Model = "models/props_combine/suit_charger001.mdl"
ITEM.NoPreview = true

ITEM.Functions = {
        OnGive = function(ply, item)
                item.Hooks.PlayerSpawn(ply, item)
        end,
        
        OnTake = function(ply, item)
                ply:SetArmor(ply:Armor() - 100)
        end,
		        OnTake = function(ply, item)
				ply:SetHealth(500)
        end,
}

ITEM.Hooks = {
        PlayerSpawn = function(ply, item)
                ply:SetArmor(ply:Armor() + 500)
        end,
		        PlayerSpawn = function(ply, item)
                ply:SetHealth(500)
        end
}

I want this code to not vanish after ttt round begin, how do I do that?

Info: Once the TTT round begins, this code doesn’t work; the round sets my health and armor back to normal. I’m also trying to make a superspeed code for ttt, anybody know of one/help me make one??

bump

[LUA]
ITEM.Name = “I created a server just so I could give myself an unfair advantage because I’m bad.”
ITEM.Price = 100000000
ITEM.Model = “models/props_combine/suit_charger001.mdl”
ITEM.NoPreview = true

ITEM.Functions = {
OnGive = function(ply, item)
item.Hooks.PlayerSpawn(ply, item)
end,

    OnTake = function(ply, item)
            ply:SetArmor(ply:Armor() - 100)
    end,
	        OnTake = function(ply, item)
			ply:SetHealth(500)
    end,

}

ITEM.Hooks = {
PlayerSpawn = function(ply, item)
timer.Simple(0.5, function()
ply:SetArmor(ply:Armor() + 500)
end)
end,
PlayerSpawn = function(ply, item)
timer.Simple(0.5, function()
ply:SetHealth(500)
end)
end
}
[/LUA]

½ second timer should do the trick; if not, just change the value higher.