Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

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

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

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
MagicStyle

[Q] play sound on entity

Recommended Posts

MagicStyle

Hi,

is it already known how to play a sound?

I try to play a sound everytime when someone receives a headshot, just like in Rust legacy



I found this native function:
  • void PLAY_SOUND_FROM_ENTITY(int p0, char *p1, Entity entity, char *p3, BOOL p4, Any p5)
    p1 = soundID within AWC file
    p3 = soundFile from SFX folder
Question:
Is it known what the other parameters (p0, p2, p4, p5) stand for?
I think the soundfile has to be in .awc Format, how to create them?
Where to put the soundfile? Presumably here?: update -> update.rpf -> x64 -> audio -> sfx
I want to play the sound from the players position, so i could also use this one and put the players coordinates:
  • void PLAY_SOUND_FROM_COORD(Any p0, Any *p1, float p2, float p3, float p4, Any *p5, BOOL p6, Any p7, BOOL p8) // 8D8686B622B88120 CAD3E2D5

I only found the following native functions by searching for "headshot":

Any REGISTER_PEDHEADSHOT(Ped ped)void UNREGISTER_PEDHEADSHOT(Ped ped)BOOL IS_PEDHEADSHOT_VALID(Ped ped)BOOL IS_PEDHEADSHOT_READY(Ped ped)char *GET_PEDHEADSHOT_TXD_STRING(Ped ped)

But i have no idea how i can achieve this idea with these native functions to be honest.
Can someone help me to achieve this mod?

Edited by MagicStyle

Share this post


Link to post
Share on other sites
ni-THiNK

I am also trying to do this, by adding my own sound file into the game that is triggered by an event.

Could someone more experienced help with what the arguments for the function mean?

 

Thanks

Share this post


Link to post
Share on other sites
CamxxCore

Sound files are encrypted. And as far as I know, someone would have to decrypt the .awc files containing the game sounds before we can edit them or add our own. OpenIV could do it for IV, but by the looks of it, they won't be updating any time soon: https://twitter.com/openiv/status/599964560305614848

Share this post


Link to post
Share on other sites
ni-THiNK

Does that mean I can't even add in my own sound files?

Share this post


Link to post
Share on other sites
Jitnaught

Does that mean I can't even add in my own sound files?

Yep.

Instead of adding them in the GTA files, use an external sound player api to play external sounds.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 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.