Kazafka Posted January 13, 2021 Share Posted January 13, 2021 (edited) Hello! I'm back after a big break. I began playing on my MTA server again. Today, I tried to add electric cars to my server. It's almost done, but there is still only one thing left to achieve. Well, I am trying to disable ALL engine sounds, for electric cars, to make them more realistic. So, I've looked up for some resources, nothing helped. setWorldSoundEnable - I don't know if this function can disable sounds for a specific entity, I only know, that it completely disables all sounds from a specific world sound group. Any ideas? Edited January 13, 2021 by VaporZ Link to comment
SpecT Posted January 13, 2021 Share Posted January 13, 2021 setWorldSoundEnable is exactly what you need but you will need to experiment to see which one is for the electric cars you will use. For example: setWorldSoundEnable(40, false) This will mute the engine sound but you will still hear the idling so you need to mute from ID 7 to 16 (depends on the car). Here is the list of the world sound groups: World_sound_groups Link to comment
Hydra Posted January 13, 2021 Share Posted January 13, 2021 function s() for i = 7, 16 do setWorldSoundEnabled(i, false) end end Link to comment
Kazafka Posted January 13, 2021 Author Share Posted January 13, 2021 2 hours ago, SpecT said: setWorldSoundEnable is exactly what you need but you will need to experiment to see which one is for the electric cars you will use. For example: setWorldSoundEnable(40, false) This will mute the engine sound but you will still hear the idling so you need to mute from ID 7 to 16 (depends on the car). Here is the list of the world sound groups: World_sound_groups 1 hour ago, Hydra said: function s() for i = 7, 16 do setWorldSoundEnabled(i, false) end end Unfortunately, nope. I mean, when I use setWorldSoundEnabled I can't hear engine sound of a Bullet, driven by my friend. Link to comment
Moderators IIYAMA Posted January 13, 2021 Moderators Share Posted January 13, 2021 7 minutes ago, VaporZ said: Unfortunately I haven't done/tested this before, but you can change the vehicle engine type. Not sure if that affects the audio as well. setVehicleHandling ( theVehicle, "engineType", "electric") Link to comment
Kazafka Posted January 13, 2021 Author Share Posted January 13, 2021 (edited) 9 minutes ago, IIYAMA said: I haven't done/tested this before, but you can change the vehicle engine type. Not sure if that affects the audio as well. setVehicleHandling ( theVehicle, "engineType", "electric") No, it doesn't affect the audio. EDIT#1: I've tested that before in normal GTA San Andreas. If engine type of cars in San Andreas would make a difference (e.g. in sound, acceleration, etc.), I wouldn't start this thread. Edited January 13, 2021 by VaporZ Link to comment
Gordon_G Posted January 13, 2021 Share Posted January 13, 2021 Hi, I highly advise you to take a look to the "bengine" ressource to take a look at how it actually works The main issue is that you have to disable EVERY VEHICLE SOUNDS for EVERY VEHICLES in order to achieve what you are trying to do (and that's how the previously mentionned resource works) Link to comment
Kazafka Posted January 13, 2021 Author Share Posted January 13, 2021 24 minutes ago, Gordon_G said: Hi, I highly advise you to take a look to the "bengine" ressource to take a look at how it actually works The main issue is that you have to disable EVERY VEHICLE SOUNDS for EVERY VEHICLES in order to achieve what you are trying to do (and that's how the previously mentionned resource works) Well, problem is, that whenever I start the resource and spawn a new vehicle, I have NO sounds. I mean, I was using bengines a long time ago before, and it played custom engine sounds. Now, it doesn't. 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