hello sorry but uhm,
how can i make duel pistols in ttt shoot with the left/ right mouse button handling?
because the way i got it now it only shoots on left mouse button, it somethimes switches the weapon which fires on that mouse click, somethimes they shoot both, somethimes the left gun shoots a few rounds, then the right gun shoots a few etc. i want it to be like in cs:s then left mouse = left gun fired right mouse = right gun fired, so i copied the file from cs:s but it doesnt work in TTT what code does ttt use for it?
SWEP.Base = "weapon_tttbase"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.ViewModel = "models/weapons/v_pist_elite.mdl"
SWEP.WorldModel = "models/weapons/w_pist_elite.mdl"
SWEP.HoldType = "pistol"
SWEP.Weight = 5
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
SWEP.Primary.Sound = Sound("Weapon_ELITE.Single")
SWEP.Primary.Recoil = 2
SWEP.Primary.Unrecoil = 7
SWEP.Primary.Damage = 12
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0
SWEP.Primary.ClipSize = 32
SWEP.Primary.Delay = 0.06 //Don't use this, use the tables below!
SWEP.Primary.DefaultClip = 92 //Always set this 1 higher than what you want.
SWEP.Primary.Automatic = false //Don't use this, use the tables below!
SWEP.Primary.Ammo = "pistol"
SWEP.AmmoEnt = "item_ammo_pistol_ttt"
SWEP.Icon = "VGUI/ttt/icon_FHserver_elites"
SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
//Firemode configuration
SWEP.IronSightsPos = Vector(0,0,0)
SWEP.IronSightsAng = Vector(0,0,0)
SWEP.data = {}
SWEP.mode = "semi" //The starting firemode
SWEP.data.newclip = false //Do not change this
SWEP.data.semi = {}
SWEP.data.semi.Delay = 0.07
SWEP.data.semi.Cone = 0.021
SWEP.data.semi.ConeZoom = 0.018
//End of configuration
function SWEP:ShootEffects()
if self.left then
self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
else
self.Weapon:SendWeaponAnim(ACT_VM_SECONDARYATTACK)
end
self.left = not self.left
self.Owner:MuzzleFlash()
self.Owner:SetAnimation( PLAYER_ATTACK1 )
end
function SWEP:Think()
if SinglePlayer() then self.data.singleplayer(self) end
if self.data.init then
self.Weapon:SetClip1( self.Weapon:Clip1() - 2 )
self.data.init = nil
end
if self.data.newclip then
if self.data.newclip == 0 then
self.data.newclip = false
if self:Ammo1() > self.Primary.ClipSize - 2 then
if self.data.oldclip == 0 then
self.Weapon:SetClip1( self.Weapon:Clip1() - 2 )
if SERVER then
self.Owner:GiveAmmo(2,self.Primary.Ammo,true)
end
elseif self.data.oldclip == 1 then
self.Weapon:SetClip1( self.Weapon:Clip1() - 1 )
if SERVER then
self.Owner:GiveAmmo(1,self.Primary.Ammo,true)
end
end
elseif self:Ammo1() > self.Primary.ClipSize - 1 then
if self.data.oldclip == 0 then
self.Weapon:SetClip1( self.Weapon:Clip1() - 1 )
if SERVER then
self.Owner:GiveAmmo(1,self.Primary.Ammo,true)
end
end
end
else
self.data.newclip = self.data.newclip - 1
end
end
end