| View previous topic :: View next topic |
| Author |
Message |
Andy9283 Guest
|
Posted: Fri Jan 09, 2009 4:42 pm Post subject: How to block a keys usage |
|
|
Hi i play GTA San Andreas on line. Or San Andreas Multiplayer (SAMP).
One server i play on is a role play server.
Built into the game itself, F4 returns you to the character selection screen.
BUT built into the server code there's life insureance- if i die i respawn with everything i had before.
BUT if i have hit my F4 key at anytime before this, i STILL go back to the class selection screen, AND i will loose all my lifes and hard work, starting again.
So i would like to create a hotkey that WILL stop the use of my F4 key, so if i accidently hit it, i won't loose my progress.
I checked the tutorial, but i findin that hard to find anything in. |
|
| Back to top |
|
 |
elchapin
Joined: 06 Mar 2007 Posts: 64 Location: Columbus, OH, USA
|
Posted: Fri Jan 09, 2009 4:49 pm Post subject: |
|
|
_________________ My startup is Telesaur - a telecommuting job site. |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 726 Location: Calgary, AB, Canada
|
Posted: Fri Jan 09, 2009 5:01 pm Post subject: |
|
|
| Code: | #IfWinActive, San Andreas ; Put the actual name of the window here.
F4::
#IfWinActive |
|
|
| Back to top |
|
 |
elchapin
Joined: 06 Mar 2007 Posts: 64 Location: Columbus, OH, USA
|
Posted: Fri Jan 09, 2009 5:05 pm Post subject: |
|
|
@Sivvy - nice call, I was just getting rid of F4 altogether! _________________ My startup is Telesaur - a telecommuting job site. |
|
| Back to top |
|
 |
andy9283 Guest
|
Posted: Fri Jan 09, 2009 5:32 pm Post subject: |
|
|
Yeah i alt+tab out and the window name of it is GTA:SA:MP.
But with that code in my script i joined game, pressed F4 but it still said "returning to class selection screen after next death".
 |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 726 Location: Calgary, AB, Canada
|
Posted: Fri Jan 09, 2009 8:37 pm Post subject: |
|
|
Some games actually prevent AHK from modifying keys...
| Code: | #IfWinExist, GTA
F4::Return
#IfWinExist |
Maybe just give this a try. |
|
| Back to top |
|
 |
Andy9283 Guest
|
Posted: Sat Jan 10, 2009 1:12 am Post subject: |
|
|
Strange, it doesn't work if i just put:
F4::Return
But with the #ifwinexist code Sivvy posted it does work. |
|
| Back to top |
|
 |
|