How do i add multiple fire sounds in a SWEP ?

Just wanted to know how to add multiple fire sounds to swep…

bump

bump

help please ? bump

Two ways.



local ShootSound1 = Sound("weapons/alyx_gun/alyx_gun_fire3.wav")
local ShootSound2 = Sound("weapons/alyx_gun/alyx_gun_fire4.wav")
local ShootSound3 = Sound("weapons/alyx_gun/alyx_gun_fire5.wav")
local ShootSound4 = Sound("weapons/alyx_gun/alyx_gun_fire6.wav")

self:EmitSound( "weapons/alyx_gun/alyx_gun_fire"..math.random(3, 6)..".wav" )


or



local ShootSounds = {
Sound("weapons/alyx_gun/alyx_gun_fire3.wav"),
Sound("weapons/alyx_gun/alyx_gun_fire4.wav"),
Sound("weapons/alyx_gun/alyx_gun_fire5.wav"),
Sound("weapons/alyx_gun/alyx_gun_fire6.wav")
}

local ssound = table.Random(ShootSounds)
self:EmitSound( ssound )


You should keep coding related topics to Developer Discussion, even if it’s minor like this.

THANK YOU C: <3

[editline]18th October 2014[/editline]

Uhhhh, where exactly i put this ?