Jump to content

[HELP] Disable all car sounds


xuaNN

Recommended Posts

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
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 by majqq
Link to comment
  • Scripting Moderators
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 by majqq
Link to comment
  • Scripting Moderators
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 by majqq
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...