Author Topic: Turn up Jihad damage/radius?  (Read 3486 times)

0 Members and 1 Guest are viewing this topic.

Offline Remixful

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Turn up Jihad damage/radius?
« on: February 20, 2015, 10:01:01 PM »
Code: [Select]
if SERVER then
   AddCSLuaFile( "shared.lua" );
   resource.AddFile("sound/explode.wav");
   resource.AddFile("sound/siege/big_explosion.wav");
end
 
SWEP.HoldType                   = "slam"
 
if CLIENT then
   SWEP.PrintName                       = "Jihad"
   SWEP.Slot                            = 7
 
   SWEP.EquipMenuData = {
      type  = "item_weapon",
      name  = "Jihad Bomb",
      desc  = "Jihad bomb"
   };
 
   SWEP.Icon = "VGUI/ttt/icon_c4"
end
 resource.AddFile("VGUI/ttt/icon_c4")

 
SWEP.Base = "weapon_tttbase"
 
SWEP.Kind = WEAPON_EQUIP
SWEP.CanBuy = {ROLE_TRAITOR}
SWEP.WeaponID = AMMO_C4
 
SWEP.ViewModel  = Model("models/weapons/v_c4.mdl")
SWEP.WorldModel = Model("models/weapons/w_c4.mdl")
resource.AddFile("models/weapons/v_c4.mdl")
resource.AddFile("models/weapons/w_c4.mdl")


SWEP.DrawCrosshair          = false
SWEP.ViewModelFlip          = false
SWEP.Primary.ClipSize       = -1
SWEP.Primary.DefaultClip    = -1
SWEP.Primary.Automatic      = false
SWEP.Primary.Ammo           = "none"
SWEP.Primary.Delay          = 5.0
 
SWEP.Secondary.ClipSize     = -1
SWEP.Secondary.DefaultClip  = -1
SWEP.Secondary.Automatic    = false
SWEP.Secondary.Ammo         = "none"
 
SWEP.NoSights               = true
 

 
function SWEP:Reload()
end 
 
function SWEP:Initialize()
    util.PrecacheSound("siege/big_explosion.wav")
    util.PrecacheSound("explode.wav")
end
 
 
function SWEP:Think() 
end
 
 

function SWEP:PrimaryAttack()
  self.Weapon:SetNextPrimaryFire(CurTime() + 2)   

  local effectdata = EffectData()
  effectdata:SetOrigin( self.Owner:GetPos() )
  effectdata:SetNormal( self.Owner:GetPos() )
  effectdata:SetMagnitude( 1 )
  effectdata:SetScale( 1 )
  effectdata:SetRadius( 80 )
  util.Effect( "Sparks", effectdata )
  self.BaseClass.ShootEffects( self )
       
  -- The rest is only done on the server
  if (SERVER) then
    timer.Simple(2, function() self:Asplode() end )
    self.Owner:EmitSound( "explode.wav" )
  end
end
 

function SWEP:Asplode()
  local k, v
           
  local ent = ents.Create( "env_explosion" )
  ent:SetPos( self.Owner:GetPos() )
  ent:SetOwner( self.Owner )
  ent:SetKeyValue( "iMagnitude", "125" )
  ent:Spawn()
  ent:Fire( "Explode", 0, 0 )
  ent:EmitSound( "siege/big_explosion.wav", 500, 500 )
  self:Remove()
end
 
 

function SWEP:SecondaryAttack()
  self.Weapon:SetNextSecondaryFire( CurTime() + 1.5 )
  local TauntSound = Sound( "taunt.wav" )
  self.Weapon:EmitSound( TauntSound )
end


How can I turn up the damage? I tried putting up imagnitude, i even tried 100,000 but then it didn't kill me but other players.

Offline Remixful

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: Turn up Jihad damage/radius?
« Reply #1 on: February 20, 2015, 10:26:20 PM »
I think i found it:
  ent:SetKeyValue( "iRadiusOverride", 1000) // Setting the radius of the explosion



EDIT: I put it up really high like to 9999999 i was expecting everyone in the map to die.. so i guess this doesn't work.
« Last Edit: February 20, 2015, 10:28:11 PM by Remixful »

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given