View previous topic :: View next topic |
Author |
Message |
Xblade Of Heaven Master Cheater
Reputation: 0
Joined: 16 Oct 2005 Posts: 395 Location: DEAD
|
Posted: Thu May 14, 2009 8:56 am Post subject: help me whit get keystate plz |
|
|
I try to make press NUMPAD 1 in trainer lisen sound "activated" and pressing again NUMPAD 1 sound "desactivated" but no work no can lisen the second sound prssing the same key 2 times, any can help me?
thanks
DELPHI CODE:
Code: | if HiWord(GetKeyState(VK_NUMPAD1)) <> 0 then
PlaySound (PChar ('ACT'), Hinstance, SND_Resource Or SND_ASYNC)
else
PlaySound (PChar ('DEC'), Hinstance, SND_Resource Or SND_ASYNC); |
_________________
Welcome to the Hell.
 |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25788 Location: The netherlands
|
Posted: Thu May 14, 2009 10:41 am Post subject: |
|
|
it's better to register your routine with RegisterHotKey2 thats defined in the hotkeyhandler unit instead of polling it yourself.
as for playsound, have you tested it under a normal button? Did that work? If not, I see you're using SND_Resource, which means ACT and DEC should be resources linked into the exe. Are they ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
Xblade Of Heaven Master Cheater
Reputation: 0
Joined: 16 Oct 2005 Posts: 395 Location: DEAD
|
Posted: Thu May 14, 2009 11:34 am Post subject: |
|
|
Dark Byte wrote: | it's better to register your routine with RegisterHotKey2 thats defined in the hotkeyhandler unit instead of polling it yourself.
as for playsound, have you tested it under a normal button? Did that work? If not, I see you're using SND_Resource, which means ACT and DEC should be resources linked into the exe. Are they ? |
hehe yes dark no see this, now work perfect using this variables thanks
_________________
Welcome to the Hell.
 |
|
Back to top |
|
 |
|