• How do I make a table with "player.concommand"?
    1 replies, posted
Well basically, I want to make it so it plays a random sound out of a table when an item is equip/removed. I just need to know how to make it play a random sound, not just one specific sound. Tried this, only plays the first sound out of the list, never any of the others. player:ConCommand("play npc/combine_soldier/gear1.wav", "play npc/combine_soldier/gear2.wav", "play npc/combine_soldier/gear3.wav", "play npc/combine_soldier/gear4.wav", "play npc/combine_soldier/gear5.wav", "play npc/combine_soldier/gear6.wav")
Read both the following and it will be simple for you to do [url]http://www.lua.org/pil/2.5.html[/url] [b][url=http://wiki.garrysmod.com/?title=Table.Random]Table.Random [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Sorry, you need to Log In to post a reply to this thread.