SA-MP Forums Archive
Engine - change hotkey to start it - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Engine - change hotkey to start it (/showthread.php?tid=560467)



Engine - change hotkey to start it - Glave - 28.01.2015

I wanna change my hotkey for starting the engine. Right now is "S" hotkey but I want to change it to another key, like "2". How I can do that?


Re: Engine - change hotkey to start it - Luis- - 28.01.2015

Just change
pawn Код:
KEY_DOWN
to
pawn Код:
KEY_LOOK_BEHIND



Re: Engine - change hotkey to start it - Glave - 29.01.2015

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Just change
pawn Код:
KEY_DOWN
to
pawn Код:
KEY_LOOK_BEHIND
Luis I don't have any KEY_DOWN in my gamemode amx


Re: Engine - change hotkey to start it - Glave - 29.01.2015

Anyone can help?


Re: Engine - change hotkey to start it - Parallex - 29.01.2015

Mind showing the command?


Re: Engine - change hotkey to start it - Glave - 29.01.2015

Quote:
Originally Posted by BenJackster
Посмотреть сообщение
Mind showing the command?
Mind showing?


Re: Engine - change hotkey to start it - Sithis - 30.01.2015

We need to see your code. Without it, we can't help you.


Re: Engine - change hotkey to start it - Glave - 30.01.2015

Here:

GM.pwn


Re: Engine - change hotkey to start it - Glave - 30.01.2015

Quote:
Originally Posted by ******
Посмотреть сообщение
You can only detect ACTIONS, not KEYS. "GetPlayerKeys" and "OnPlayerKeyStateChange" are for that reason poorly named. You can detect when someone presses "jump", but there is no way to determine what key they used to jump, nor is there any way to detect specific keys.

Think of it as "GetPlayerActions" and "OnPlayerActionStateChange", and it will all be much clearer.

In this case, there is no way to globally change an action from "S" to "2", because those keys have no meaning to the server. If you just want to change that for YOURSELF, do it from your SA game settings - find the action mapped to "S" and change it to "2". The server will still register the same action, but you are pressing a different key. Alternatively, you can change the action on the server globally from something (such as JUMP) to something else (such as FIRE), but there is no guarantee that either of those keys will be "S" or "2" for any given player.
So, how can I solve that? To change it to another button or something...? I wanna fix it.

If I can delete "S" and use only the command /engine , it would be fine too.


Re: Engine - change hotkey to start it - Glave - 30.01.2015

Anyone?