Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local SWEP = {}
- SWEP.Base = "test_weapon2"
- SWEP.HoldType = "pistol"
- SWEP.WorldModel = "models/weapons/w_pist_glock18.mdl"
- SWEP.ViewModel = "models/weapons/v_pist_glock18.mdl"
- SWEP.Primary =
- {
- Ammo = "pistol",
- Automatic = false,
- ClipSize = 10,
- DefaultClip = 1,
- Damage = 10,
- Bullet =
- {
- Sound =
- {
- Path = "Weapon_AWP.Single",
- Pitch = {50, 80},
- },
- }
- }
- SWEP.Secondary =
- {
- Ammo = "pistol",
- Automatic = false,
- ClipSize = 10,
- DefaultClip = 1,
- Damage = 1,
- Bullet =
- {
- Sound =
- {
- Path = "chatsounds/autoadd/youtube_expedition_1/Horse Neigh.mp3",
- Pitch = {50, 150},
- },
- }
- }
- function SWEP:OnInputEvent(key, press)
- if press and key == IN_ATTACK then
- self.Owner:SetAnimation(PLAYER_ATTACK1)
- self:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
- self:ShootBullets(self.Primary.Bullet)
- end
- end
- function SWEP:Think()
- if self:IsKeyDown(IN_ATTACK2) then
- self.Owner:SetAnimation(PLAYER_ATTACK1)
- self:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
- self:ShootBullets(self.Secondary.Bullet)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment