Strip weapon causes a problem in preround on my TTT server. how would I check to see if the round has started before stripping. Here is an example of the code I am using. (it's for pointshop)
[CODE]ITEM.Name = 'Improver'
ITEM.Price = 50000
ITEM.Model = 'models/props_c17/SuitCase_Passenger_Physics.mdl'
ITEM.Bone = 'ValveBiped.Bip01_Spine2'
function ITEM:OnEquip(ply, modifications)
ply:PS_AddClientsideModel(self.ID)
end
function ITEM:OnHolster(ply)
ply.CanChange = false
ply:PS_RemoveClientsideModel(self.ID)
end
function ITEM:ModifyClientsideModel(ply, model, pos, ang)
model:SetModelScale(0.8, 0)
pos = pos + (ang:Right() * 5) + (ang:Up() * 6) + (ang:Forward() * 2)
return model, pos, ang
end
function ITEM:Think(ply, modifications)
if ply.CanChange == true then
if ply:HasWeapon( 'weapon_ttt_flaregun' ) then
ply:PrintMessage(HUD_PRINTTALK, "beep")
ply:StripWeapon('weapon_ttt_flaregun')
ply:PrintMessage(HUD_PRINTTALK, "boop")
ply:Give('dragon')
ply:PrintMessage(HUD_PRINTTALK, "WEAPON UPGRADED")
-- ply:SelectWeapon('dragon')
-- ply:PrintMessage(HUD_PRINTTALK, "Selected")
end
end
end
[/CODE]