Would this be possible? (Key Defines)
#1

Before i bother pissing around attempting to get this to work without any understanding of it will or not, mainly so i don't waste my time.

I'd like to use other keys located on the UK & US keyboard formats such as A,B,C,F,S,T and so on Using the VK Codes that Microsoft provides..


pawn Код:
#define  KEY_KEY_A                      0x41
#define  KEY_KEY_B                      0x42
#define  KEY_KEY_C                      0x43
#define  KEY_KEY_D                      0x44
#define  KEY_KEY_E                      0x45
#define  KEY_KEY_F                      0x46
#define  KEY_KEY_G                      0x47
#define  KEY_KEY_H                      0x48
#define  KEY_KEY_I                      0x49
#define  KEY_KEY_J                      0x4A
#define  KEY_KEY_K                      0x4B
#define  KEY_KEY_L                      0x4C
#define  KEY_KEY_M                      0x4D
#define  KEY_KEY_N                      0x4E
#define  KEY_KEY_O                      0x4F
#define  KEY_KEY_P                      0x50
#define  KEY_KEY_Q                      0x51
#define  KEY_KEY_R                      0x52
#define  KEY_KEY_S                      0x53
#define  KEY_KEY_T                      0x54
#define  KEY_KEY_U                      0x55
#define  KEY_KEY_V                      0x56
#define  KEY_KEY_W                      0x57
#define  KEY_KEY_X                      0x58
#define  KEY_KEY_Y                      0x59
#define  KEY_KEY_Z                      0x5A
#define  KEY_LBUTTON                    0x01
#define  KEY_MBUTTON                    0x04
#define  KEY_RBUTTON                    0x02
#define  KEY_UP                         0x26
#define  KEY_DOWN                       0x28
#define  KEY_LEFT                       0x25
#define  KEY_RIGHT                      0x27
#define  KEY_LSHIFT                     0xA0
#define  KEY_RSHIFT                     0xA1
#define  KEY_SPACE                      0x20
Reply
#2

Unfortunately, this won't work. The client needs to synchronize the key presses to your server if you want to check those keys. Without a customized client, every client will only report these keys. Other key presses will not be sent to the server and thus cannot be checked for in your script.
Reply
#3

Quote:
Originally Posted by Basssiiie
Посмотреть сообщение
Unfortunately, this won't work. The client needs to synchronize the key presses to your server if you want to check those keys. Without a customized client, every client will only report these keys. Other key presses will not be sent to the server and thus cannot be checked for in your script.
It might be a good addition to SA-MP in the next or Future update(s).
Reply
#4

The main problem is that I dont think SA-MP can configure some keys. I think it is only certain keys you can program. But I might be wrong.
Reply
#5

In SA-MP you can only use those keys which you were able to use in single player. So this means that the keys will have to be added in the single player in other words, will have to be modified from the client side, which is next to impossible to add this feature for your server.
Reply
#6

It would be possible as feature, but it isn't yet a feature probably because it would require a bit more data to send to the server and thus increasing bandwith requirements. Now it isn't a lot more, but who knows. At the moment all the key presses are sent in just one 32 bit variable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)