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()
- timer.Simple(1, function()
- local tr = self.Owner:GetEyeTrace()
- local ent = ents.Create( "sent_rocket" )
- local v = self.Owner:GetShootPos()
- v = v + self.Owner:GetForward() * (!short and 1 or 2)
- v = v + self.Owner:GetRight() * 3
- v = v + self.Owner:GetUp() * (!short and 100 or -300)
- if SERVER then
- ent:SetPos( v )
- ent:SetOwner( self.Owner )
- ent:SetAngles(self.Owner:EyeAngles())
- ent.RocketOwner = self.Owner
- ent:Spawn()
- local phys = ent:GetPhysicsObject()
- phys:ApplyForceCenter( self.Owner:GetAimVector() * 10000000000000 + Vector(0,0,200) )
- --phys:SetVelocity( phys:GetVelocity() + self.Owner:GetVelocity() )
- phys:EnableGravity(true)
- 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
- if ( self.Owner:IsNPC() ) then return end
- end)
- end
- easylua.EndWeapon()
Advertisement
Add Comment
Please, Sign In to add comment