xuaNN Posted June 30, 2019 Share Posted June 30, 2019 I need to disable all car sounds. (Brake, gas, engine, etc.) i am using the setWorldSoundEnabled but i can't find gta:sa sounds. On this way, i disabled all of sounds using while. Like this function disableCarSounds() local groups = 300 while (groups >= 0) do setWorldSoundEnabled(groups, false) groups = groups - 1 end end addEventHandler("onClientResourceStart", getRootElement(), disableCarSounds) How can i find car sounds ids? Link to comment
Scripting Moderators ds1-e Posted June 30, 2019 Scripting Moderators Share Posted June 30, 2019 (edited) 14 minutes ago, xuaNN said: I need to disable all car sounds. (Brake, gas, engine, etc.) i am using the setWorldSoundEnabled but i can't find gta:sa sounds. On this way, i disabled all of sounds using while. Like this function disableCarSounds() local groups = 300 while (groups >= 0) do setWorldSoundEnabled(groups, false) groups = groups - 1 end end addEventHandler("onClientResourceStart", getRootElement(), disableCarSounds) How can i find car sounds ids? Not sure, but take a look here: https://wiki.multitheftauto.com/wiki/World_sound_groups You can use loop to disable them, if you don't know how, let me know. Edited June 30, 2019 by majqq Link to comment
xuaNN Posted June 30, 2019 Author Share Posted June 30, 2019 i dont know how to use pairs and for loops. Link to comment
Scripting Moderators ds1-e Posted June 30, 2019 Scripting Moderators Share Posted June 30, 2019 (edited) 12 minutes ago, xuaNN said: i dont know how to use pairs and for loops. First of all, getRootElement() should be changed to resourceRoot, otherwise this function will trigger, if any resource starts. Second. You need to know certain indexes, quote from wiki: Quote Note: The values for group and index can be determined by using the client command showsound in conjunction with setDevelopmentMode https://wiki.multitheftauto.com/wiki/SetDevelopmentMode I don't think there's need to use pairs or ipairs loop, just int loop. If you will get them, answer here, i'll try to help you with it. Edited June 30, 2019 by majqq Link to comment
xuaNN Posted June 30, 2019 Author Share Posted June 30, 2019 i wan't to get them I added the SetDevelopementMode function, and I tried to use the showsound command, but the sounds were very confusing as I was at sea. Link to comment
Scripting Moderators ds1-e Posted June 30, 2019 Scripting Moderators Share Posted June 30, 2019 (edited) 2 hours ago, xuaNN said: i wan't to get them I added the SetDevelopementMode function, and I tried to use the showsound command, but the sounds were very confusing as I was at sea. Then you maybe might go to other place and check it there? Edited June 30, 2019 by majqq Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now