• Play a sound to everyone on sever?
    4 replies, posted
I'm trying to use sound.play to play a sound to everyone for a killstreak system but it requires a vector, is there a way just to play it to everyone?
[QUOTE=Handsome Matt;47116557][url]http://wiki.garrysmod.com/page/player/GetAll[/url] [url]http://wiki.garrysmod.com/page/Net_Library_Usage[/url] [url]http://wiki.garrysmod.com/page/surface/PlaySound[/url][/QUOTE] How do you use surface.playsound, whenever I use it it just says "attempt to index global 'surface' (a nil value)" I'm currently trying this: [code] for x = 1, #player.GetAll() do player.GetAll()[x].surface.PlaySound("rampage.wav") end [/code]
[code]BroadcastLua("surface.PlaySound('my/sound.wav')")[/code]
Sorry, you need to Log In to post a reply to this thread.