Nos partenaires et nous-mêmes utilisons différentes technologies, telles que les cookies, pour personnaliser les contenus et les publicités, proposer des fonctionnalités sur les réseaux sociaux et analyser le trafic. Merci de cliquer sur le bouton ci-dessous pour donner votre accord. Vous pouvez changer d’avis et modifier vos choix à tout moment. Informations RGPD
SWEP.Author = "Piper" SWEP.Contact = "" SWEP.Purpose = "To simply, Blink to your desired location and smite thou whom Zeus cannot." SWEP.Instructions = "LMB to teleport to a destination" SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.ViewModel = "models/weapons/v_hands.mdl" SWEP.WorldModel = "models/weapons/w_hands.mdl" SWEP.HoldType = "normal" SWEP.Category = "Charmed Magic" SWEP.ViewModelFOV = 57 SWEP.Primary.ClipSize = 10000 SWEP.Primary.DefaultClip = 10000 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "357" SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" SWEP.Sound = "lightning.mp3" function SWEP:Think() end function SWEP:PrimaryAttack(ply) local vPoint = self.Owner:GetPos() local effectdata = EffectData() effectdata:SetStart( vPoint ) effectdata:SetOrigin( vPoint ) effectdata:SetScale( 1 ) util.Effect( "entity_remove", effectdata ) self:EmitSound("lightning.mp3") local t = util.GetPlayerTrace(self.Owner) local tr = util.TraceLine(t) local eye = tr.HitPos self.Owner:SetPos(eye) local vecPoint = eye local effectdata2 = EffectData() effectdata2:SetStart( vecPoint ) effectdata2:SetOrigin( vecPoint ) effectdata2:SetScale ( 1 ) util.Effect( "entity_remove", effectdata2 ) self:EmitSound("lightning.mp3") end function SWEP:SecondaryAttack() if ( !self:CanPrimaryAttack() ) then return end local eyetrace = self.Owner:GetEyeTrace(); -- this gets where you are looking. The SWep is making an explosion where you are LOOKING, right? self:EmitSound ( self.Sound ) Sound "explode.mp3" -- this makes the sound, which I specified earlier in the code self:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) -- this makes the shooting animation for the 357 local explode = ents.Create( "env_explosion" ) explode:SetColor(0, 255, 0, 255) explode:SetPos( eyetrace.HitPos ) -- this creates the explosion where you were looking explode:SetOwner( self.Owner ) -- this sets you as the person who made the explosion explode:Spawn() -- this actually spawns the explosion explode:SetKeyValue( "iMagnitude", "60" ) -- the magnitude explode:Fire( "Explode", 0, 0 ) explode:EmitSound( "explode.mp3", 100, 100 ) -- the sound for the explosion, and how far away it can be heard self:SetNextSecondaryFire( CurTime() + 5 ) -- this sets the delay for the next primary and secondary fires. self:TakePrimaryAmmo(0) -- removes 1 ammo from our clip end