• Lua code not playing sound :L?
    2 replies, posted
[lua] local snd = {1,3,4} timer.Create("LockPickSounds", 1, Lockpicktime, function(wep) if not IsValid(wep) then return end wep:EmitSound("weapons/pistol_10mm/wpn_pistol10mm_reload".. tostring(snd[math.random(1, #snd)]) ..".wav", 50, 50) end, self) [/lua] Its not playing the sound :L Why?
You can't add args after the timer function anymore. Remove "wep" inside function() and change all "wep" to "self" within the function.
Thanks mate, it works now.
Sorry, you need to Log In to post a reply to this thread.