Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- easylua.StartWeapon("mortarbanni")
- SWEP.Base = "weapon_sh_scout"
- SWEP.ViewModel = "models/weapons/v_rpg.mdl"
- SWEP.ViewModelFlip = false
- SWEP.Primary.Sound = "/weapons/flare_detonator_explode.wav"
- function SWEP:CSShootBullet()
- if SERVER then
- local ent = ents.Create("sent_rocket")
- ent:SetPos(self.Owner:EyePos() + self.Owner:GetUp() * 5)
- ent:SetOwner(self.Owner)
- ent:SetAngles(self.Owner:EyeAngles())
- ent.RocketOwner = self.Owner
- ent:Spawn()
- local phys = ent:GetPhysicsObject()
- phys:ApplyForceCenter(self.Owner:GetAimVector() * 100)
- timer.Simple(0.8, function()
- if phys:IsValid() then
- phys:AddVelocity(self.Owner:GetAimVector() * 10000000000000 + Vector(0,0,200))
- end
- end)
- end
- if self.Owner:IsNPC() then return end
- self.Owner:RemoveAmmo(0, self.Primary.Ammo)
- self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK) // View model animation
- self.Owner:MuzzleFlash() // Crappy muzzle light
- self.Owner:SetAnimation(PLAYER_ATTACK1) // 3rd Person Animation
- end
- easylua.EndWeapon()
Advertisement
Add Comment
Please, Sign In to add comment