Zexon (13 posts so far) | | for people who want weapons with scopes on already well here you go
Copy and paste and save-as Shared.lua
.............................................................................
SWEP.Weight = 5 //how much the gun weighs (don't change)
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false
SWEP.Primary.Sound = Sound( "||set||" ) //what sound the gun is ex.: weapon_deagle.single
SWEP.Primary.Recoil = ||set|| //how much recoil the gun has
SWEP.Primary.Damage = ||set|| //how much damgage the gun does
SWEP.Primary.NumShots = ||set||
SWEP.Primary.Cone = ||set o.|| //shot radius/spread for a shot gun 0.10 is good, for a normal gun try 0.02 or 0.03.. type 0.00 for no spread
SWEP.Primary.ClipSize = 99999 //clip size of course... replace with a # if you want
SWEP.Primary.Delay = ||set|| //how fast the gun fires
SWEP.Primary.DefaultClip = 99999 // ammo left
SWEP.Primary.Automatic = ||set- true, false|| // if it's automatic (true) or not (false)
SWEP.Primary.Ammo = "pistol" // ammo type DO NOT REPLACE UNLESS YOUR MAKING A SHOTGUN then change it to "buckshot"
SWEP.Secondary.ClipSize = -1 // don't change the secondary options unless you know what your doing
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"
/*---------------------------------------------------------
SecondaryAttack
---------------------------------------------------------*/
function SWEP:SecondaryAttack()
if(ScopeLevel == 0) then
if(SERVER) then
self.Owner:SetFOV( 45, 0 )
end
ScopeLevel = 1
else if(ScopeLevel == 1) then
if(SERVER) then
self.Owner:SetFOV( 25, 0 )
end
ScopeLevel = 2
else
if(SERVER) then
self.Owner:SetFOV( 0, 0 )
end
ScopeLevel = 0
end
end
end
function SWEP:Holster()
self.Owner:SetFOV( 0, 0 )
ScopeLevel = 0
return true
end
|