ESC - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ESC (
/showthread.php?tid=143454)
ESC -
Aram555 - 22.04.2010
How to make the such:
When press on ESC it is written from above NICK that is in ESC?
Re: ESC -
ScottCFR - 23.04.2010
Just OnPlayerKeyAction then put a print function and see what it says the key is then make your own function with that
Re: ESC -
Calgon - 23.04.2010
Quote:
Originally Posted by ScottCFR
Just OnPlayerKeyAction then put a print function and see what it says the key is then make your own function with that
|
Yet again, facts wrong.
1) The key change callback is actually OnPlayerKeyStateChange.
2) OnPlayerKeyStateChange doesn't record the ESC key.
OnPlayerUpdate stops calling if a player tabs out, a way would be to set a timer every time that OnPlayerUpdate is called and then if it's not repeated - then use your code to SetPlayerName.
Re: ESC -
russo666 - 23.04.2010
Quote:
Originally Posted by FreddoX [BINMAN
]
Quote:
Originally Posted by ScottCFR
Just OnPlayerKeyAction then put a print function and see what it says the key is then make your own function with that
|
Yet again, facts wrong.
1) The key change callback is actually OnPlayerKeyStateChange.
2) OnPlayerKeyStateChange doesn't record the ESC key.
OnPlayerUpdate stops calling if a player tabs out, a way would be to set a timer every time that OnPlayerUpdate is called and then if it's not repeated - then use your code to SetPlayerName.
|
Now i'm curious, can you do an example please?
Re: ESC -
Calgon - 23.04.2010
Quote:
Originally Posted by russooooo
Quote:
Originally Posted by FreddoX [BINMAN
]
Quote:
Originally Posted by ScottCFR
Just OnPlayerKeyAction then put a print function and see what it says the key is then make your own function with that
|
Yet again, facts wrong.
1) The key change callback is actually OnPlayerKeyStateChange.
2) OnPlayerKeyStateChange doesn't record the ESC key.
OnPlayerUpdate stops calling if a player tabs out, a way would be to set a timer every time that OnPlayerUpdate is called and then if it's not repeated - then use your code to SetPlayerName.
|
Now i'm curious, can you do an example please?
|
I could, but I can't really be bothered.
Take a look at this:
http://forum.sa-mp.com/index.php?topic=78166.0
Re: ESC -
russo666 - 23.04.2010
Quote:
Originally Posted by FreddoX [BINMAN
]
Quote:
Originally Posted by russooooo
Quote:
Originally Posted by FreddoX [BINMAN
]
Quote:
Originally Posted by ScottCFR
Just OnPlayerKeyAction then put a print function and see what it says the key is then make your own function with that
|
Yet again, facts wrong.
1) The key change callback is actually OnPlayerKeyStateChange.
2) OnPlayerKeyStateChange doesn't record the ESC key.
OnPlayerUpdate stops calling if a player tabs out, a way would be to set a timer every time that OnPlayerUpdate is called and then if it's not repeated - then use your code to SetPlayerName.
|
Now i'm curious, can you do an example please?
|
I could, but I can't really be bothered.
Take a look at this: http://forum.sa-mp.com/index.php?topic=78166.0
|
Ok, no prob. Thanks.