Can anyone supply me with a buy T code for pointshop? All the ones I found don't work or produce errors.
[code]ITEM.Name = 'Traitor' -- name in the store
ITEM.Price = 150 -- price
ITEM.Material = 'VGUI/ttt/sprite_traitor.vmt' -- icon
ITEM.OneUse = true -- buy once, then have to rebuy
function ITEM:OnEquip(ply, modifications)
hook.Add("TTTBeginRound", ply:UniqueID() .. "_traitor", function()
if ply:GetRoleString() != "traitor" then
ply:SetRole(ROLE_TRAITOR)
ply:AddCredits(GetConVarNumber("ttt_credits_starting"))
end
if SERVER then
ply:PS_TakeItem(self.ID)
end
hook.Remove("TTTBeginRound", ply:UniqueID() .. "_traitor")
end)
end
function ITEM:OnHolster(ply)
hook.Remove("TTTBeginRound", ply:UniqueID() .. "_traitor")
end
function ITEM:OnSell(ply)
hook.Remove("TTTBeginRound", ply:UniqueID() .. "_traitor")
end [/code]
This option breaks the very point of the gamemode in my opinion.
[QUOTE=zapha;41884340]This option breaks the very point of the gamemode in my opinion.[/QUOTE]
My players are requesting this. I agree with you and because of that I'm making it so it's not easy to get. I actively ask for feedback and a lot of them wanted this, so I'm adding it.
[editline]18th August 2013[/editline]
[QUOTE=Humility;41882431][code]ITEM.Name = 'Traitor' -- name in the store
ITEM.Price = 150 -- price
ITEM.Material = 'VGUI/ttt/sprite_traitor.vmt' -- icon
ITEM.OneUse = true -- buy once, then have to rebuy
function ITEM:OnEquip(ply, modifications)
hook.Add("TTTBeginRound", ply:UniqueID() .. "_traitor", function()
if ply:GetRoleString() != "traitor" then
ply:SetRole(ROLE_TRAITOR)
ply:AddCredits(GetConVarNumber("ttt_credits_starting"))
end
if SERVER then
ply:PS_TakeItem(self.ID)
end
hook.Remove("TTTBeginRound", ply:UniqueID() .. "_traitor")
end)
end
function ITEM:OnHolster(ply)
hook.Remove("TTTBeginRound", ply:UniqueID() .. "_traitor")
end
function ITEM:OnSell(ply)
hook.Remove("TTTBeginRound", ply:UniqueID() .. "_traitor")
end [/code][/QUOTE]
This is perma T?...
EDIT: Nevermind
Sorry, you need to Log In to post a reply to this thread.