Results 1 to 14 of 14
  1. #1
    Mike Shinoda's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,177
    Reputation
    67
    Thanks
    165
    My Mood
    Amazed

    D3D9 Hack - Playing Wav Sound [Solved]

    I just want to make when i enable a hack a .wav tone sound i mean when i enable ex.superjump then make a sound like a ding...thanks for reading
    It always starts with one thing...

  2. #2
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    First, add this at the top of the source file:

    [highlight=c++]#pragma comment( lib, "Winmm.lib" )[/highlight]

    After that, include this header file:

    [highlight=c++]#include <Windows.h>[/highlight]

    Finally, when you want to play the sound; add this line at that place:

    [highlight=c++]PlaySound((LPCTSTR)L"C:\\Windows\\Media\\chimes.wa v",nullptr,SND_SYNC);[/highlight]

    PlaySound function resides in the windows.h header file that plays the specified wav sound. We included #pragma comment( lib, "Winmm.lib" ) at the top of the source because we had to instruct the linker to add this additional dependency. #pragma comment is used to specify linker options.

    Hope this clarifies and solves your question.

  3. #3
    Mike Shinoda's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,177
    Reputation
    67
    Thanks
    165
    My Mood
    Amazed
    Quote Originally Posted by Hassan View Post
    First, add this at the top of the source file:

    [highlight=c++]#pragma comment( lib, "Winmm.lib" )[/highlight]

    After that, include this header file:

    [highlight=c++]#include <Windows.h>[/highlight]

    Finally, when you want to play the sound; add this line at that place:

    [highlight=c++]PlaySound((LPCTSTR)L"C:\\Windows\\Media\\chimes.wa v",nullptr,SND_SYNC);[/highlight]

    PlaySound function resides in the windows.h header file that plays the specified wav sound. We included #pragma comment( lib, "Winmm.lib" ) at the top of the source because we had to instruct the linker to add this additional dependency. #pragma comment is used to specify linker options.

    Hope this clarifies and solves your question.
    thanks for your replay but i got this error
    error C2065: 'nullptr' : undeclared identifier
    edit:i fix it but this will playing all the time how can i do it play one time and then stop?
    Last edited by Mike Shinoda; 08-29-2011 at 01:44 PM.
    It always starts with one thing...

  4. #4
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by makis5 View Post
    thanks for your replay but i got this error
    error C2065: 'nullptr' : undeclared identifier
    edit:i fix it but this will playing all the time how can i do it play one time and then stop?

    Put the surrounding code. I mean where have you put this code. Post some code and I might be able to help you. For me, it only plays once.

  5. #5
    Mike Shinoda's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,177
    Reputation
    67
    Thanks
    165
    My Mood
    Amazed
    i do that for my panic key just for testing it
    @Hassan

    void beep()
    {
    if(CH_PanicKey)
    {
    PlaySound((LPCTSTR)L"C:\\Windows\\Media\\chimes.wa v",0,SND_SYNC);

    }
    }
    so when i enable my panickey in menu it will make the sound but they sound its keep playing..and also its only beeping not doing the chimes sound...
    Last edited by Mike Shinoda; 08-29-2011 at 02:23 PM.
    It always starts with one thing...

  6. #6
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by makis5 View Post
    i do that for my panic key just for testing it
    @Hassan


    so when i enable my panickey in menu it will make the sound but they sound its keep playing..and also its only beeping not doing the chimes sound...
    Hmm, seems like the code is doing an infinite loop. I still need to look into CH_Panic before I can tell you with all certainty that the code is running under an infinite loop.

    @makis5

  7. #7
    Mike Shinoda's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,177
    Reputation
    67
    Thanks
    165
    My Mood
    Amazed
    Quote Originally Posted by Hassan View Post


    Hmm, seems like the code is doing an infinite loop. I still need to look into CH_Panic before I can tell you with all certainty that the code is running under an infinite loop.

    @makis5
    do you have any time to help me via teamviewer or something?
    @Hassan
    It always starts with one thing...

  8. #8
    Terell.'s Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    JAMAICAA
    Posts
    6,923
    Reputation
    273
    Thanks
    1,163
    My Mood
    Angry
    Quote Originally Posted by Hassan View Post


    Hmm, seems like the code is doing an infinite loop. I still need to look into CH_Panic before I can tell you with all certainty that the code is running under an infinite loop.

    @makis5
    the CH_ would serve somewhat as a hotkey.

    Warrock Minion 8-13-2011 - N/A
    A.V.A Minion since 11-1-11 - 11-12-11

  9. #9
    Mike Shinoda's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,177
    Reputation
    67
    Thanks
    165
    My Mood
    Amazed
    Quote Originally Posted by Shunnai View Post
    the CH_ would serve somewhat as a hotkey.
    so do you know how to do it or where to search on web to find a tutorial?
    It always starts with one thing...

  10. #10
    Terell.'s Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    JAMAICAA
    Posts
    6,923
    Reputation
    273
    Thanks
    1,163
    My Mood
    Angry
    @makis5
    Use
    Code:
    void beep()
    {
    if(CH_PanicKey)
    {
    PlaySound((LPCTSTR)L"C:\\Windows\\Media\\chimes.wa v",0,SND_SYNC);
    
    }
    }
    And then put VK_RIGHT or whatever hotkey your using.

    @Hassan delete my post above please.

    Warrock Minion 8-13-2011 - N/A
    A.V.A Minion since 11-1-11 - 11-12-11

  11. The Following User Says Thank You to Terell. For This Useful Post:

    Mike Shinoda (09-01-2011)

  12. #11
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Quote Originally Posted by Shunnai View Post
    @makis5
    Use
    Code:
    void beep()
    {
    if(CH_PanicKey)
    {
    PlaySound((LPCTSTR)L"C:\\Windows\\Media\\chimes.wa v",0,SND_SYNC);
    
    }
    }
    And then put VK_RIGHT or whatever hotkey your using.

    Hassan delete my post above please.
    Done. He is already doing exactly what you said. So, I doubt that might be of any help. @Shunnai

  13. The Following User Says Thank You to Hassan For This Useful Post:

    Mike Shinoda (09-01-2011)

  14. #12
    Terell.'s Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    JAMAICAA
    Posts
    6,923
    Reputation
    273
    Thanks
    1,163
    My Mood
    Angry
    He's doing a d3dmenu, VK_RIGHT might just trigger the hotkey.

    Warrock Minion 8-13-2011 - N/A
    A.V.A Minion since 11-1-11 - 11-12-11

  15. The Following User Says Thank You to Terell. For This Useful Post:

    Mike Shinoda (09-01-2011)

  16. #13
    Mike Shinoda's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,177
    Reputation
    67
    Thanks
    165
    My Mood
    Amazed
    Thank you boys both of you help me much now its working
    It always starts with one thing...

  17. #14
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    Cool and NP.
    /Marked Solved.

Similar Threads

  1. [Source Code] Playing a Wav sound in a D3D
    By Terell. in forum DirectX/D3D Development
    Replies: 2
    Last Post: 09-12-2011, 03:18 PM
  2. [Solved] D3D9 Hack Test
    By crazybone96 in forum CrossFire Help
    Replies: 8
    Last Post: 08-15-2011, 05:09 PM
  3. [Solved] CAFlames and other hacks won't work... Solved
    By Hikatso in forum Combat Arms Help
    Replies: 17
    Last Post: 04-28-2011, 10:41 PM
  4. Steam Hack- play with vacban
    By thesynyster32 in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 6
    Last Post: 06-30-2009, 09:59 PM
  5. Tired of no free hacks? PLAY USA
    By steve000 in forum Combat Arms Europe Hacks
    Replies: 35
    Last Post: 01-18-2009, 05:27 AM