So, with all that in mind - your final code should look something like this: local snds=file. You can do this by looping through the table and calling util.PrecacheSound(path) on them, like so: for k,v in pairs(snds) do I would also recommend precaching all the sounds. Make sure you create the table of sounds outside of the GM:PlayerFootstep function, so that it only runs once. If this video helped you out leave a like and subscribe for more Thanks for watching and farewell :)Links-vGarry's Mod Steam Workshop. In your code, simply call local snds=file.Find( "sound/customsteps/*", "GAME" ) which gives you a table, then you can simply choose a random one from the list using local snd=snds and play it as you do in your above code - ply:EmitSound(snd). wav format for the sound files, but some others do work (. I'd recommend having a custom folder such as sound/customsteps/ where you can put all your custom sounds. It can be used in TeamSpeak or Discord and in Steam games such as CS:GO or PLAYER UNKNOWN'S. You'll want to look at the file.Find function for this. This video explains how to play music in-game and over your mic.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |