Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

C++ Scripthook Audio Events


Mordecki
 Share

Recommended Posts

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

Hi,

 

maybe it's useful smile.gif

 

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 biggrin.gif

Link to comment
Share on other sites

Grady Featherstone

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

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

Grady Featherstone
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

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

@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# smile.gif

 

C ya biggrin.gif

 

EDIT: PS: It's better to use "PLAY_SOUND_FROM_VEHICLE" because you can simply start and stop the sound with sound ID wink.gif

Edited by Skorpro
Link to comment
Share on other sites

Grady Featherstone

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 by Grady Featherstone
Link to comment
Share on other sites

Prof_Farnsworth
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

  • 6 months later...
Hi,

 

maybe it's useful smile.gif

 

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 biggrin.gif

Woha, didn't check for ansfer lately, that worked thanks smile.gif

Link to comment
Share on other sites

 

Woha, didn't check for ansfer lately, that worked thanks smile.gif

You're welcome smile.gif(PROSZĘ BARDZO)

Link to comment
Share on other sites

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
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.