I meant it this way:

Every key can be pressed or not pressed => 1 or 0
A skill consists of 4 Byte => 32 bit

Now you say, bit 1 is the status of the move forward key. If bit1 is 1 this key is pressed, if it is 0 it isn't.

This is how you store the keys:
Code:
my.skill1 = 0;
my.skill1 |= key_pressed(20); //forward key in bit1
my.skill1 |= key_pressed(21)<<1; //backward key in bit2
my.skill1 |= key_pressed(22)<<2; //left key in bit3
my.skill1 |= key_pressed(23)<<3; //right key in bit4
//and so on



On the server you can get them this way:
Code:
forward_key = my.skill1&0x00000001; //get bit1
backward_key = my.skill1&0x00000002; //bet bit2
left_key = my.skill1&0x00000004;
right_key = my.skill1&0x00000006;
//and so on




ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version