• Player client sound play
    11 replies, posted
Question, (located in init.lua) trying to make so when i type client_soundplay "player name" "sound path" it will play a sound for ONLY that person, but it still plays global. code: [url]http://pastebin.com/gML5jqRN[/url] What im doing wrong? / any fix?
soundtarget:SendLua([[surface.PlaySound(]]..args[2]..[[)]])
where shold i add that line?
Where you are doing EmitSound.
Still confused, mind edit it and send back?
[url]http://pastebin.com/vfvW8Bq9[/url]
Console: client_playsound jack runner/dog_spawn.mp3 [LuaCmd:1] attempt to index global 'dog_spawn' (a nil value)
oh sorry, make it look like ("]]..args[2]..[[")
Like this? soundtarget:SendLua([[surface.PlaySound("]]..args[2]..[[")]])
Yea, try that.
The use of square brackets here looks ugly. [code] soundtarget:SendLua("surface.PlaySound(' "..args[2].." ')") [/code]
Sorry, you need to Log In to post a reply to this thread.