• Jihad Help
    1 replies, posted
Since the most recent gmod update, when someone dies from my Jihad they die, but their bodies are still labeled as alive and if you ID their bodies it doesn't change it. Also, they can type to living players. Understandable if people don't want to read through it all, I just don't know what it could be. [lua]AddCSLuaFile() resource.AddFile("sound/jihad/ohgodpleasenocut.wav") resource.AddFile("sound/jihad/notthebeescut.wav") resource.AddFile("sound/jihad/youbroketherulescut.wav") if CLIENT then SWEP.PrintName = "Jihad Bomb" SWEP.Slot = 6 SWEP.Icon = "vgui/ttt/icon_c4" SWEP.IconLetter = "I" end -- Always derive from weapon_tttbase SWEP.Base = "weapon_tttbase" -- Standard GMod values SWEP.HoldType = "slam" SWEP.Primary.Ammo = "none" SWEP.Primary.Delay = 5 SWEP.Primary.ClipSize = -1 SWEP.Primary.ClipMax = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = false -- Model properties SWEP.UseHands = true SWEP.ViewModelFlip = false SWEP.ViewModelFOV = 54 SWEP.ViewModel = Model( "models/weapons/cstrike/c_c4.mdl" ) SWEP.WorldModel = Model( "models/weapons/w_c4.mdl" ) -- TTT config values -- Kind specifies the category this weapon is in. Players can only carry one of -- each. Can be: WEAPON_... MELEE, PISTOL, HEAVY, NADE, CARRY, EQUIP1, EQUIP2 or ROLE. -- Matching SWEP.Slot values: 0 1 2 3 4 6 7 8 SWEP.Kind = WEAPON_EQUIP1 -- If AutoSpawnable is true and SWEP.Kind is not WEAPON_EQUIP1/2, then this gun can -- be spawned as a random weapon. SWEP.AutoSpawnable = false -- The AmmoEnt is the ammo entity that can be picked up when carrying this gun. SWEP.AmmoEnt = "none" -- CanBuy is a table of ROLE_* entries like ROLE_TRAITOR and ROLE_DETECTIVE. If -- a role is in this table, those players can buy this. SWEP.CanBuy = { ROLE_TRAITOR } -- InLoadoutFor is a table of ROLE_* entries that specifies which roles should -- receive this weapon as soon as the round starts. In this case, none. SWEP.InLoadoutFor = { nil } -- If LimitedStock is true, you can only buy one per round. SWEP.LimitedStock = true -- If AllowDrop is false, players can't manually drop the gun with Q SWEP.AllowDrop = true -- If IsSilent is true, victims will not scream upon death. SWEP.IsSilent = false -- If NoSights is true, the weapon won't have ironsights SWEP.NoSights = true -- Precache custom sounds function SWEP:Precache() util.PrecacheSound( "siege/big_explosion.wav" ) util.PrecacheSound( "siege/jihad.wav" ) util.PrecacheSound( "jihad/ohgodpleasenocut.wav" ) util.PrecacheSound( "jihad/notthebeescut.wav" ) util.PrecacheSound( "jihad/youbroketherulescut.wav" ) end function SWEP:Reload() end function SWEP:Initialize() util.PrecacheSound("siege/big_explosion.wav") util.PrecacheSound("siege/jihad.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( 8 ) effectdata:SetScale( 1 ) effectdata:SetRadius( 76 ) 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( "siege/jihad.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", "150" ) 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 ) local TauntSound = Sound( "vo/npc/male01/overhere01.wav" ) self.Weapon:EmitSound( TauntSound ) end[/lua]
Errors? Give us your console log.
Sorry, you need to Log In to post a reply to this thread.