I recently added one of the m9k weapons, Thompson and everything works fine expect the fact that it doesnt pick up ammo. Here is the lua file, I believe nothing is wrong. Has this happen to anybody before and how did you fix it?
if SERVER then
AddCSLuaFile( "shared.lua" )
end
SWEP.HoldType = "ar2" -- how others view you carrying the
if CLIENT then
SWEP.PrintName = "Tommy Gun"
SWEP.Slot = 2
end
SWEP.PrintName = "Tommy Gun" -- Weapon name (Shown on HUD)
SWEP.Slot = 2 -- Slot in the weapon selection menu
SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up
SWEP.ViewModelFOV = 65
SWEP.ViewModelFlip = true
SWEP.ViewModel = "models/weapons/v_tommy_g.mdl" -- Weapon view model
SWEP.WorldModel = "models/weapons/w_tommy_gun.mdl" -- Weapon world model
SWEP.Base = "weapon_tttbase"
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.FiresUnderwater = false
SWEP.Primary.Damage = 15 -- Base damage per bullet
SWEP.Primary.Delay = 0.08
SWEP.Primary.Sound = Sound("Weapon_tmg.Single")
SWEP.Primary.ClipSize = 30
SWEP.Primary.ClipMax = 90
SWEP.Primary.DefaultClip = 30
SWEP.Primary.Automatic = true
SWEP.Primary.Ammo = "smg1"
SWEP.Kind = WEAPON_HEAVY
SWEP.Secondary.IronFOV = 60 -- How much you 'zoom' in. Less is more!
SWEP.AutoSpawnable = true
-- Enter iron sight info and bone mod info below
SWEP.IronSightsPos = Vector(3.359, 0, 1.84)
SWEP.IronSightsAng = Vector(-2.166, -4.039, 0)
SWEP.SightsPos = Vector(3.359, 0, 1.84)
SWEP.SightsAng = Vector(-2.166, -4.039, 0)
SWEP.GSightsPos = Vector (0, 0, 0)
SWEP.GSightsAng = Vector (0, 0, 0)
SWEP.RunSightsPos = Vector (-2.3095, -3.0514, 2.3965)
SWEP.RunSightsAng = Vector (-19.8471, -33.9181, 10)
[code]SWEP.AmmoEnt = "item_ammo_smg1_ttt"[/code]
[quote]This specifies which ammo entity the player should pick up for this weapon. If a certain ammo entity is not set as the AmmoEnt of one of a player's weapons, they cannot pick up that ammo.
The following ammo entities are in TTT by default:
item_ammo_pistol_ttt: Pistol and M16 ammo.
item_ammo_smg1_ttt: SMG ammo, used by MAC10 and UMP.
item_ammo_revolver_ttt: Desert eagle ammo.
item_ammo_357_ttt: Sniper rifle ammo.
item_box_buckshot_ttt: Shotgun ammo.[/quote]
Source: [url]http://ttt.badking.net/custom-weapon-guide[/url]
[QUOTE=code_gs;43264359][code]SWEP.AmmoEnt = "item_ammo_smg1_ttt"[/code]
Source: [url]http://ttt.badking.net/custom-weapon-guide[/url][/QUOTE]
thanks that works. One more question, how do i know what i should put for SWEP.Primary.Sound? This is my current line SWEP.Primary.Sound = Sound("Weapon_tmg.Single") and it seems as if the sound doesnt work. How do i know what i should put for the .Single.
Sounds have to be a complete path. I think what you're looking for is
[code]SWEP.Primary.Sound = Sound("weapons/tmp/tmp-1.wav")[/code]
[QUOTE=code_gs;43264543]Sounds have to be a complete path. I think what you're looking for is
[code]SWEP.Primary.Sound = Sound("weapons/tmp/tmp-1.wav")[/code][/QUOTE]
hmm ill give it a shot, and oh yeah one more question. Which wav file do i start off with? Am i suppose to add all of the wav file?
[QUOTE=monstermega10;43264672]hmm ill give it a shot, and oh yeah one more question. Which wav file do i start off with? Am i suppose to add all of the wav file?[/QUOTE]
What do you mean "start off with?"
[QUOTE=code_gs;43264755]What do you mean "start off with?"[/QUOTE]
In the sounds file, there will be a few sound.wav but which one do i use?
[editline]21st December 2013[/editline]
[QUOTE=code_gs;43264755]What do you mean "start off with?"[/QUOTE]
okay so the shooting sound works, i tested it out. But theres no sound when reloading, do you know how to fix this by any chance?
I found a way of installing the sounds but i have no idea where to place that file
sound.Add(
{
name = "Soundname.fire",
channel = CHAN_WEAPON,
volume = 1.0,
soundlevel = 100,
pitchstart = 95,
pitchend = 105,
sound = "weapons/filepath"
})
Can anyone please help?
Sorry, you need to Log In to post a reply to this thread.