Is there anyway to set a TTT passive item to wear off/expire? (ie. when ply:HasEquipItem() is called, it will return false)
I figure the players active equipment is stored in a table which you could remove it from
does anyone know the table?
self.equipment_items = bit.bor(self.equipment_items, id)
How it adds items to the player (self is the player, ID the id of the equipment item)
so what I am getting (after studying a bit of bitwise) is this -
self.equipment_items = bit.bxor(self.equipment_items, id)
if it works, I’ll edit this post
It does have the function return false, but the item is still not repurchasable in the buy/c menu, any ideas?
local mybits = 0 mybits = bit.bor(mybits, 2) -- give 2 4 and 8 to mybits mybits = bit.bor(mybits, 4) mybits = bit.bor(mybits, 8) print(bit.band(mybits, 4) == 4) -- does mybits have 4 mybits = bit.band(mybits, bit.bnot(4)) -- take away 4 from mybits print(bit.band(mybits, 4) == 4) -- does mybits have 4 print(bit.band(mybits, 2) == 2) -- does mybits have 2
true false true
[editline]10th May 2015[/editline]
self.equipment_items = bit.band(self.equipment_items, bit.bnot(id))