FINALY! I have been whaiting for this kind of script for so long and now you saved me. thank you sooooooooo muchโฆ and btw i think that the ai run away makes it bit more realistic as it sounds in real life like gunshots
Edit: if i could ask you one script to top this off, would be turbo lag menu, so you could set an rpm in a menu and a torque or powerboost and when your car would hit that rpm, it would engage the torque/power boost and you could simulate turbo lag or 2 stroke hitting the hing spot on power band
thats pretty sweet man. just 2 things - the explosions sound so different from the default backfire that im wondering if there isnt any other solution. Also, on some cars (probably only on addon cars) the explosion whill not only happen too far behind the exhaust but can happen inside the car at the same time aswell
how to change the volume? and is it possible if user didnt enable als they cant hear others als? this is really great resource but it will be good if it have that option i mention since some troller might abuse it at crowded area in the future
yes, if someone else has ALS active anyone around them can hear it as it is server side. If you want to prevent trolls then add ACE permissions to the resource yourself.
and calmai doesnt work very well. somehow playing a sound, even if its that explosion would probably be better as it wouldnt be an actual explosion then. but the normal gta backfiresound would be best
ok. i figured it out. a list of things i have changed in my script
removed explosions because ai was going nuts
added my own backfire sounds
13 different sounds
randomized volume
synced backfire size with backfire loudness
sound becomes quieter the further away another player is (also plays together with the randomized volume of the bangs)
what i will do:
sync backfire size with its loudness DONE
add 2D effects to the sound depending on where the bangs are in relation to the player
current bugs (which i will also resolve):
sound is serverside played to all players in a given radius but i need to lower the volume and maybe even do some effects to it the further away a player is. At the moment it sounds for everyone in the radius the same, which was not the case with engine-native explosions as the engine knows how distant sounds should sound like.
some cars have 4 exhaust pipes coded in but actually use just 1 or 2 (probably only affects addon cars). Those cars have the backfire in the middle of the car so we need to check the โbonesโ of (well, probably) exhaust 1 and see of the other bones are in a certain distance to eachother. if one or more exceed the limit, they should not be used. there maybe a high error rate because some exhausts are Y pipes and actually have some distance between them. we could do a hardcoded list of cars though where we specify the bonesโฆ idk yet.
ill share my code with @T.Silence once i figured that out. Here is a video of what to expect:
Would love to have version that doesnt freak out the ai. So far this is looking like an awesome edit. When you are ready to release it please let me know
it does sync. its tested. it also cuts off after a certain distance but i need to implement the volume getting lower the further you are away from the source.