Mordecki Posted September 12, 2012 Share Posted September 12, 2012 Hey, does anyone got any info where i can find audio events list ? I am looking for siren sound to use with PlayAudioEventFromVehicle. Thanks ! Link to comment Share on other sites More sharing options...
Skorpro Posted September 17, 2012 Share Posted September 17, 2012 Hi, maybe it's useful I've used PlaySoundFromVehicle in my "Undercover Police Car" mod. C++ eSound sirenSound;Vehicle copCar;sirenSound = GetSoundId();...// Start soundPlaySoundFromVehicle(sirenSound, "AMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP", copCar);...// Stop soundStopSound(sirenSound);ReleaseSoundId(sirenSound); "AMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP" was taken from "..\Rockstar Games\Grand Theft Auto IV\pc\audio\Config\SOUNDS.DAT15". Here some examples: RESIDENT_AMB_RESIDENT_ALARM_SIREN_24AMBIENT_HORNS_REGULAR_SIRENSAMBIENCE_VEHICLES_HORNS_POLICE_WARNINGAMBIENT_HORNS_REGULAR_SIRENS_COP_SIRENAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOPAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RNDAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_AAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_BAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_CAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_A_PLAYFORAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_B_PLAYFORAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_C_PLAYFORAMBIENT_HORNS_REGULAR_SIRENS_PLAYFORBC3_BUOYS_AHOY_HARBOUR_PATROL_SIRENVEHICLES_HORNS_POLICE_WARNING_SIMPLESIRENS_SLOWSIRENS_SLOW_MULTISIRENS_SLOW_MULTI_SIREN_ENVELOPESIRENS_SLOW_MULTI_ON_STOPSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCKSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOPSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_ENVSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_SEQSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_SEQ_GET_TIMESIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_GET_CUR_TIMESIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_COMPUTE_PITCHSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_COMPUTE_CUTOFFSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_COMPUTE_VOLUMEVEHICLES_HORNS_SIREN_1_WRAPPERVEHICLES_HORNS_SIREN_1_WRAPPER_1SIRENS_SIRENS_SLOW_COMPONENTS_MULTISIRENS_SIRENS_SLOW_COMPONENTS_MULTI_OUTOFTUNESIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ2SIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ2_PAUSESIRENS_SLOW_RANDOMIZERSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_ENV_IS_f*ckEDSIRENS_SIRENS_SLOW_COMPONENTS_SILENCERSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_RANDOMIZE_PITCHSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_CALC_FACTORSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_MULT_CUTOFFSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_SUB_PITCHSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_SUB_TIMEVEHICLES_HORNS_POLICE_WARNING_LOOPSIRENS_RANDOM_WARNING_SEQSIRENS_RANDOM_WARNING_RANDOMSIRENS_RANDOM_WARNING_RANDOM_1SIRENS_RANDOM_WARNING_RANDOM_2SIRENS_RANDOM_WARNING_RANDOM_3SIRENS_RANDOM_WARNING_RANDOM_4SIRENS_BLIP_SEQ_1SIRENS_AIRHORNSIRENS_EURO_HIGHSIRENS_EURO_LOWSIRENS_f*ckEDVEHICLES_HORNS_FIRETRUCK_WARNING_HORN_SIRENS_AIRHORNPLAYER_f*ckED_SIRENPLAYER_f*ckED_SIREN_MATHSPLAYER_f*ckED_SIREN_SEQPLAYER_f*ckED_SIREN_SEQ_GET_START_TIMESIRENS_TEST_MATHPLAYER_f*ckED_SIREN_MATHS_FSEPLAYER_f*ckED_SIREN_SEQ_GET_TIME... Have fun Link to comment Share on other sites More sharing options...
Grady Featherstone Posted September 17, 2012 Share Posted September 17, 2012 Is it possible to do that in C#? I've found the native function PLAY_AUDIO_EVENT_FROM_VEHICLE but GTAModding doesn't have any information for it... Link to comment Share on other sites More sharing options...
Deluxe8900 Posted September 19, 2012 Share Posted September 19, 2012 Is it possible to do that in C#?I've found the native function PLAY_AUDIO_EVENT_FROM_VEHICLE but GTAModding doesn't have any information for it... C# serious? Use llvlm its a interactive assmbler written in C-like syntax with a framework to call natives functions, or more common called Scocl. It's much easier. Just need to know int, vars, loops, and thats pretty much it. void main() { REMOVE_PLAYER_WEAPONS(weapon, ped) player native (forget it) } much easier in C++ than C# where you have to do like 9 lines code, C++ you can do it in 4 or even less. Link to comment Share on other sites More sharing options...
Grady Featherstone Posted September 19, 2012 Share Posted September 19, 2012 Is it possible to do that in C#?I've found the native function PLAY_AUDIO_EVENT_FROM_VEHICLE but GTAModding doesn't have any information for it... C# serious? Use llvlm its a interactive assmbler written in C-like syntax with a framework to call natives functions, or more common called Scocl. It's much easier. Just need to know int, vars, loops, and thats pretty much it. void main() { REMOVE_PLAYER_WEAPONS(weapon, ped) player native (forget it) } much easier in C++ than C# where you have to do like 9 lines code, C++ you can do it in 4 or even less. But what if you don't know the parameters for the actual native? Link to comment Share on other sites More sharing options...
ch3y3zze Posted September 20, 2012 Share Posted September 20, 2012 if u dont know parameters then u can guess the parameters, some are obvious and another way is to actually debug the game and reverse the function yourself but that's another story and btw Deluxe u can call any native function with c# as long as u know the params and c# is simple, u make it sound like it is something unnecessary and difficult please show me an example of something that takes 4 lines in c# but 1 line in scocl, im curious Link to comment Share on other sites More sharing options...
Skorpro Posted September 20, 2012 Share Posted September 20, 2012 (edited) @Grady Featherstone Hi, Native parameters: PLAY_AUDIO_EVENT_FROM_VEHICLE(const ch *audioName, Vehicle car); C++ Code: Vehicle car;GetCarCharIsUsing(GetPlayerPed(), &car);if (IsCharInCar(GetPlayerPed(),car)) { PlayAudioEventFromVehicle("AMBIENT_HORNS_REGULAR_SIRENS", car); }else { PrintStringWithLiteralStringNow("STRING", "Get a car first!", 2000, 1); } For Sounds like "AMBIENT_HORNS_REGULAR_SIRENS" see example above (my first post). Please ask ch3y3zze for a conversion to C# C ya EDIT: PS: It's better to use "PLAY_SOUND_FROM_VEHICLE" because you can simply start and stop the sound with sound ID Edited September 20, 2012 by Skorpro Link to comment Share on other sites More sharing options...
Grady Featherstone Posted September 24, 2012 Share Posted September 24, 2012 (edited) Hey Skorpro, thanks for the response!!!! This code works great in C#! GTA.Native.Function.Call("PLAY_AUDIO_EVENT_FROM_VEHICLE", "AMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP", Player.Character.CurrentVehicle); But to stop it I tried GTA.Native.Function.Call("AMBIENT_AUDIO_BANK_NO_LONGER_NEEDED"); But that didn't work... I'm not sure if there's a way to set the native function to have a sound ID like in C++...? And also, how'd you open the SOUNDS.DAT15? I tried in Spark IV but it couldn't open it... Edited September 24, 2012 by Grady Featherstone Link to comment Share on other sites More sharing options...
Prof_Farnsworth Posted September 26, 2012 Share Posted September 26, 2012 Hey Skorpro, thanks for the response!!!! This code works great in C#! GTA.Native.Function.Call("PLAY_AUDIO_EVENT_FROM_VEHICLE", "AMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP", Player.Character.CurrentVehicle); But to stop it I tried GTA.Native.Function.Call("AMBIENT_AUDIO_BANK_NO_LONGER_NEEDED"); But that didn't work... I'm not sure if there's a way to set the native function to have a sound ID like in C++...? And also, how'd you open the SOUNDS.DAT15? I tried in Spark IV but it couldn't open it... You can open the DAT files with "OpenIV". Link to comment Share on other sites More sharing options...
Mordecki Posted April 17, 2013 Author Share Posted April 17, 2013 Hi, maybe it's useful I've used PlaySoundFromVehicle in my "Undercover Police Car" mod. C++ eSound sirenSound;Vehicle copCar;sirenSound = GetSoundId();...// Start soundPlaySoundFromVehicle(sirenSound, "AMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP", copCar);...// Stop soundStopSound(sirenSound);ReleaseSoundId(sirenSound); "AMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP" was taken from "..\Rockstar Games\Grand Theft Auto IV\pc\audio\Config\SOUNDS.DAT15". Here some examples: RESIDENT_AMB_RESIDENT_ALARM_SIREN_24AMBIENT_HORNS_REGULAR_SIRENSAMBIENCE_VEHICLES_HORNS_POLICE_WARNINGAMBIENT_HORNS_REGULAR_SIRENS_COP_SIRENAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOPAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RNDAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_AAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_BAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_CAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_A_PLAYFORAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_B_PLAYFORAMBIENT_HORNS_REGULAR_SIRENS_COP_SIREN_LOOP_RND_MT_C_PLAYFORAMBIENT_HORNS_REGULAR_SIRENS_PLAYFORBC3_BUOYS_AHOY_HARBOUR_PATROL_SIRENVEHICLES_HORNS_POLICE_WARNING_SIMPLESIRENS_SLOWSIRENS_SLOW_MULTISIRENS_SLOW_MULTI_SIREN_ENVELOPESIRENS_SLOW_MULTI_ON_STOPSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCKSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOPSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_ENVSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_SEQSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_SEQ_GET_TIMESIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_GET_CUR_TIMESIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_COMPUTE_PITCHSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_COMPUTE_CUTOFFSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_COMPUTE_VOLUMEVEHICLES_HORNS_SIREN_1_WRAPPERVEHICLES_HORNS_SIREN_1_WRAPPER_1SIRENS_SIRENS_SLOW_COMPONENTS_MULTISIRENS_SIRENS_SLOW_COMPONENTS_MULTI_OUTOFTUNESIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ2SIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ2_PAUSESIRENS_SLOW_RANDOMIZERSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_ENV_IS_f*ckEDSIRENS_SIRENS_SLOW_COMPONENTS_SILENCERSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_RANDOMIZE_PITCHSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_CALC_FACTORSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_MULT_CUTOFFSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_SUB_PITCHSIRENS_SIRENS_SLOW_COMPONENTS_VAR_BLOCK_LOOP_SEQ_SUB_TIMEVEHICLES_HORNS_POLICE_WARNING_LOOPSIRENS_RANDOM_WARNING_SEQSIRENS_RANDOM_WARNING_RANDOMSIRENS_RANDOM_WARNING_RANDOM_1SIRENS_RANDOM_WARNING_RANDOM_2SIRENS_RANDOM_WARNING_RANDOM_3SIRENS_RANDOM_WARNING_RANDOM_4SIRENS_BLIP_SEQ_1SIRENS_AIRHORNSIRENS_EURO_HIGHSIRENS_EURO_LOWSIRENS_f*ckEDVEHICLES_HORNS_FIRETRUCK_WARNING_HORN_SIRENS_AIRHORNPLAYER_f*ckED_SIRENPLAYER_f*ckED_SIREN_MATHSPLAYER_f*ckED_SIREN_SEQPLAYER_f*ckED_SIREN_SEQ_GET_START_TIMESIRENS_TEST_MATHPLAYER_f*ckED_SIREN_MATHS_FSEPLAYER_f*ckED_SIREN_SEQ_GET_TIME... Have fun Woha, didn't check for ansfer lately, that worked thanks Link to comment Share on other sites More sharing options...
julionib Posted April 18, 2013 Share Posted April 18, 2013 Hey,does anyone got any info where i can find audio events list ? I am looking for siren sound to use with PlayAudioEventFromVehicle. Thanks ! maybe this can help you find the proper sound, check the end of the blog post http://gtaxscripting.blogspot.com/2013/03/...d-external.html Link to comment Share on other sites More sharing options...
Skorpro Posted April 19, 2013 Share Posted April 19, 2013 Woha, didn't check for ansfer lately, that worked thanks You're welcome (PROSZĘ BARDZO) Link to comment Share on other sites More sharing options...
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