TTT Jihad

Post Reply
Robotic
New to forums
New to forums
Posts: 5
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Sun Jan 24, 2016 11:31 am

TTT Jihad

Post by Robotic »

So, me and my dev have been trying to figure out how to do jihad sounds, but we add it and if you buy it/disable it (In pointshop) the defualt allalalla jihad sound stops working and we can't fix it, anyone have any idea on how to fix it.
Robotic
New to forums
New to forums
Posts: 5
Joined: Sun Jan 24, 2016 11:31 am

Re: TTT Jihad

Post by Robotic »

So, Me and my developer have tried making jihad taunts in pointshop, our code that we have for the pointshop item is
ITEM.Name = 'Sparta'
ITEM.Price = 1200
ITEM.Material = 'trails/love.vmt'

function ITEM:OnEquip(ply)
ply.JihadTaunt = "siege/sttts_juggernaut.mp3";
end

function ITEM:OnHolster(ply, mods)
ply.JihadTaunt = nil;
end
But when we buy it use the jihad, it makes no sound and doesn't say anything like sound is missing in the console but no sound is played and the sounds are auto downloaded via our jihad resource folder. heres the code for the sounds
--AutoDL the jihad stuff :3

--sounds
resource.AddFile( "sound/siege/jihad.wav" );
resource.AddFile( "sound/siege/big_explosion.wav" );
resource.AddFile( "sound/siege/sttts_brick_top.mp3" );
resource.AddFile( "sound/siege/sttts_cena.mp3" );
resource.AddFile( "sound/siege/sttts_juggernaut.mp3" );
resource.AddFile( "sound/siege/sttts_flop.mp3" );
resource.AddFile( "sound/siege/sttts_flop_sec.mp3" );
resource.AddFile( "sound/siege/sttts_cena_explode.mp3" );
resource.AddFile( "sound/siege/sttts_sparta.mp3" );
when i just added one of the siege's mp3 file to the defualt jihad sound it worked but now that it's a taunt in pointshop it doesn't work and breaks the sound.
Robotic
New to forums
New to forums
Posts: 5
Joined: Sun Jan 24, 2016 11:31 am

Re: TTT Jihad

Post by Robotic »

So heres the current pointshop code tried fixing it myself didn't work again


ITEM.Name = 'Bricktop'
ITEM.Price = 1200
ITEM.Model = 'models/props/cs_office/radio.mdl'

function ITEM:OnEquip(ply)
ply.JihadTaunt = "siege/sttts_brick_top.mp3";
end

function ITEM:OnHolster(ply, mods)
ply.JihadTaunt = nil;
end


and my jihad


if SERVER then
AddCSLuaFile( "shared.lua" )
end

SWEP.HoldType = "slam"

if CLIENT then
SWEP.PrintName = "Jihad bomb"
SWEP.Slot = 7

SWEP.EquipMenuData = {
type = "item_weapon",
desc = "Jihad bomb. Used to blow up large crowds."
};

SWEP.Icon = "VGUI/ttt/icon_c4"
end

SWEP.DrawCrosshair = false

SWEP.Base = "weapon_tttbase"

SWEP.Spawnable = true
SWEP.AdminSpawnable = true

SWEP.ViewModel = "models/weapons/cstrike/c_c4.mdl"
SWEP.WorldModel = "models/weapons/w_c4.mdl"
SWEP.UseHands = true
SWEP.AutoSpawnable = false

SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "none"
SWEP.Primary.Delay = 3
SWEP.DeploySpeed = 0

SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = "none"

SWEP.Kind = WEAPON_EQUIP
SWEP.CanBuy = {ROLE_TRAITOR} -- only detectives can buy
SWEP.LimitedStock = true -- only buyable once
SWEP.WeaponID = AMMO_C4

/*---------------------------------------------------------
Reload does nothing
---------------------------------------------------------*/
function SWEP:Reload()
end

function SWEP:Initialize()
util.PrecacheSound("siege/big_explosion.wav")
util.PrecacheSound("siege/jihad.wav")
util.PrecacheSound("siege/sttts_brick_top.mp3")
end


/*---------------------------------------------------------
Think does nothing
---------------------------------------------------------*/
function SWEP:Think()
end


/*---------------------------------------------------------
PrimaryAttack
---------------------------------------------------------*/
function SWEP:PrimaryAttack()
self.Weapon:SetNextPrimaryFire(CurTime() + 3)


local effectdata = EffectData()
effectdata:SetOrigin( self.Owner:GetPos() )
effectdata:SetNormal( self.Owner:GetPos() )
effectdata:SetMagnitude( 8 )
effectdata:SetScale( 1 )
effectdata:SetRadius( 16 )
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 )
if self.Owner:PS_HasItemEquipped("Bricktop") then
self.Owner:EmitSound("siege/sttts_brick_top.mp3")
else
self.Owner:EmitSound("siege/jihad.wav")
end
end
end
--The asplode function
function SWEP:Asplode()
local k, v

// Make an explosion at your position
local ent = ents.Create( "env_explosion" )
ent:SetPos( self.Owner:GetPos() )
ent:SetOwner( self.Owner )
ent:Spawn()
ent:SetKeyValue( "iMagnitude", "250" )
ent:Fire( "Explode", 0, 0 )
ent:EmitSound( "siege/big_explosion.wav", 500, 500 )

self.Owner:Kill( )
self:Remove()
self.Owner:AddFrags( -1 )

for k, v in pairs( player.GetAll( ) ) do
v:ConCommand( "play siege/big_explosion.wav\n" )
end

end

-- SecondaryAttack
function SWEP:SecondaryAttack()
self.Weapon:SetNextSecondaryFire( CurTime() + 1 )
local TauntSound = Sound( "vo/npc/male01/overhere01.wav" )
self.Weapon:EmitSound( TauntSound )

-- The rest is only done on the server
if (!SERVER) then return end
self.Weapon:EmitSound( TauntSound )
end
Post Reply