Swep problem

ok so i created a weapon with lua turned it into a gma put it into gmod addons folder then when i open gmod i cant find a single trace of the swep

LUA:
AddCSLuaFile()
SWEP.Base = “weapon_base”
SWEP.PrintName = “ShotBlast”
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = true
SWEP.DrawCrosshair = true
SWEP.ViewModel = “models/weapons/v_shotgun.mdl”
SWEP.WorldModel = “models/weapons/w_shotgun.mdl”
SWEP.ReloadSound = “itshowtime”
SWEP.HoldType = “shotgun”
– Other settings
SWEP.Weight = 2
SWEP.AutoSwitchTo = true
SWEP.Spawnable = true

– Weapon info
SWEP.Author = “Zelso”
SWEP.Contact = “noo”
SWEP.Purpose = “Fun”
SWEP.Instructions = “Shoot at freinds face and get a frineme”

– Primary fire settings
SWEP.Primary.Sound = “itshowtime”
SWEP.Primary.Damage = 100
SWEP.Primary.NumShots = 50
SWEP.Primary.Recoil = 0.01
SWEP.Primary.Cone = 5
SWEP.Primary.Delay = 0,18
SWEP.Primary.ClipSize = 30
SWEP.Primary.DefaultClip = 10
SWEP.Primary.Tracer = 1
SWEP.Primary.Force = 200
SWEP.Primary.Automatic = 2
SWEP.Primary.Ammo = “Grenade”
SWEP.Category = “Zelso Guns”

– Secondary fire settings
SWEP.Secondary.Sound = “itshowtime”
SWEP.Secondary.Damage = 100
SWEP.Secondary.NumShots = 5
SWEP.Secondary.Recoil = 0,5
SWEP.Secondary.Cone = 5
SWEP.Secondary.Delay = 0,18
SWEP.Secondary.ClipSize = 30
SWEP.Secondary.DefaultClip = 10
SWEP.Secondary.Tracer = 1
SWEP.Secondary.Force = 100
SWEP.Secondary.Automatic = true
SWEP.Secondary.Ammo = “CombineCannon”

in your case, the GMA file you’ve put in the addons folder won’t be mounted, as it does not originate from the workshop. use the addon folder you used to make the GMA, in place of the existing GMA.

Ok i will try that next. Well it works butt the sound file ins not playing for reloading or shooting

if you have not done it already, register a sound, using sound.Add().

where should i put ?
LUA:sound.Add( {
name = “itshowtime”,
channel = CHAN_STATIC,
volume = 1.0,
level = 80,
pitch = { 95, 110 },
sound = “sound/itshowtime.wav”
} )

For the future you should wrap your code around


 tags.

As for the sound, if you don't want to use sound.Add you can directly reference the sound using the sound string. So:



SWEP.Primary.Sound = Sound( “weapons/m249-1.wav” )




Would work.

[editline]11th November 2015[/editline]



[quote="Zelso, post:5, topic:214455"]

where should i put ?
LUA:sound.Add( {
    name = "itshowtime",
    channel = CHAN_STATIC,
    volume = 1.0,
    level = 80,
    pitch = { 95, 110 },
    sound = "sound/itshowtime.wav"
} )
[/QUOTE]

 


sound.Add( {
name = “itshowtime”,
channel = CHAN_STATIC,
volume = 1.0,
level = 80,
pitch = { 95, 110 },
sound = “itshowtime.wav”
} )




or just



SWEP.Primary.Sound = Sound( “itshowtime.wav” )




All sound paths are relative to the SOUND folder. So you don't need to put that in there

got this in console doing that(btw i have it in sound folder)

Unsupported 32-bit wave file itshowtime.wav
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository
Failed to load sound “itshowtime.wav”, file probably missing from disk/repository

Is the file called

itsshowtime.wav

or

itshowtime.wav

because one of them is proper english and one isn’t

the improper one

Is it directly in the sound folder like

sound/itshowtime.wav and not sound/sound/itshowtime.wav?

SWEP.Primary.Sound = “itshowtime.wav”

also here is the path incase i need to move sound file
PATH:C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons\shotblast (here i have lua, sound and models)

[editline]11th November 2015[/editline]

yes directly in the sound folder
sound/itshowtime.wav

Try the sound.Add approach and see if you get the same error. If you do, there’s some foul play going on with your addon folder. The model loads okay and everything?

[editline]11th November 2015[/editline]

try

SWEP.Primary.Sound = Sound( “itshowtime.wav” )

as well

[editline]SCRATCH THAT BULLSHIT[/editline]

The *file *is fucked, look here:


Unsupported 32-bit wave file itshowtime.wav

Your wav file isn’t converted properly. FIX IT

This is why you need to wrap your stuff in


 tags

you think i could fix it with sony vegas i rendered it as 16bit testing it now

Whatever program you used to convert it to the wav format should be enough to fix it

Unless you literally renamed the sound file from .mp3 to .wav

Audacity can be used to convert sound files. Alternatively, HLDJ has an automatic extension that will convert files to source supported wav’s. Choice is yours

well no errors in console but their is no audio

Did you remember to restart Gmod to make sure the sound reloaded?

yup. here want me to just send you the folder?

nevermind i got it working … Thank you so much!!!