[Help][TTT] pointshop Melee weapon spawns on spectator
2 replies, posted
[LUA]
ITEM.Name = 'Axe'
ITEM.Price = 100
ITEM.Model = "models/weapons/w_axe.mdl"
ITEM.WeaponClass = "weapon_ttt_axe"
function ITEM:OnEquip(ply, modifications)
ply:StripWeapon( "weapon_zm_improvised" )
ply:Give( self.WeaponClass )
end
function ITEM:OnHolster(ply)
ply:StripWeapon ( "weapon_ttt_axe" )
ply:Give( self.WeaponClass )
end
function ITEM:PlayerSpawn(ply)
ply:StripWeapon('weapon_zm_improvised')
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end
[/LUA]
So basially everytime i go spectator im given the weapon back im not sure how to fix this, if some1 can point me in the right direction or give advice on what to do that would be brilliant
Thanks
[QUOTE=chrisgemmo;42925209][LUA]
ITEM.Name = 'Axe'
ITEM.Price = 100
ITEM.Model = "models/weapons/w_axe.mdl"
ITEM.WeaponClass = "weapon_ttt_axe"
function ITEM:OnEquip(ply, modifications)
ply:StripWeapon( "weapon_zm_improvised" )
ply:Give( self.WeaponClass )
end
function ITEM:OnHolster(ply)
ply:StripWeapon ( "weapon_ttt_axe" )
ply:Give( self.WeaponClass )
end
function ITEM:PlayerSpawn(ply)
ply:StripWeapon('weapon_zm_improvised')
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end
[/LUA]
So basially everytime i go spectator im given the weapon back im not sure how to fix this, if some1 can point me in the right direction or give advice on what to do that would be brilliant
Thanks[/QUOTE]
Check if the player is alive before giving the weapon.
ok thanks :)
Sorry, you need to Log In to post a reply to this thread.