-const int BOT_CMD_KEY_FORWARD = 1;
-const int BOT_CMD_KEY_BACKWARD = 2;
-const int BOT_CMD_KEY_RIGHT = 4;
-const int BOT_CMD_KEY_LEFT = 8;
-const int BOT_CMD_KEY_JUMP = 16;
-const int BOT_CMD_KEY_ATTACK1 = 32;
-const int BOT_CMD_KEY_ATTACK2 = 64;
-const int BOT_CMD_KEY_USE = 128;
-const int BOT_CMD_KEY_HOOK = 256;
-const int BOT_CMD_KEY_CROUCH = 512;
-const int BOT_CMD_KEY_CHAT = 1024;
-
-float bot_presskeys()
-{SELFPARAM();
- self.movement = '0 0 0';
- self.BUTTON_JUMP = false;
- self.BUTTON_CROUCH = false;
- self.BUTTON_ATCK = false;
- self.BUTTON_ATCK2 = false;
- self.BUTTON_USE = false;
- self.BUTTON_HOOK = false;
- self.BUTTON_CHAT = false;
-
- if(self.bot_cmd_keys == BOT_CMD_KEY_NONE)
+const int BOT_CMD_KEY_FORWARD = BIT(0);
+const int BOT_CMD_KEY_BACKWARD = BIT(1);
+const int BOT_CMD_KEY_RIGHT = BIT(2);
+const int BOT_CMD_KEY_LEFT = BIT(3);
+const int BOT_CMD_KEY_JUMP = BIT(4);
+const int BOT_CMD_KEY_ATTACK1 = BIT(5);
+const int BOT_CMD_KEY_ATTACK2 = BIT(6);
+const int BOT_CMD_KEY_USE = BIT(7);
+const int BOT_CMD_KEY_HOOK = BIT(8);
+const int BOT_CMD_KEY_CROUCH = BIT(9);
+const int BOT_CMD_KEY_CHAT = BIT(10);
+
+bool bot_presskeys(entity this)
+{
+ this.movement = '0 0 0';
+ PHYS_INPUT_BUTTON_JUMP(this) = false;
+ PHYS_INPUT_BUTTON_CROUCH(this) = false;
+ PHYS_INPUT_BUTTON_ATCK(this) = false;
+ PHYS_INPUT_BUTTON_ATCK2(this) = false;
+ PHYS_INPUT_BUTTON_USE(this) = false;
+ PHYS_INPUT_BUTTON_HOOK(this) = false;
+ PHYS_INPUT_BUTTON_CHAT(this) = false;
+
+ if(this.bot_cmd_keys == BOT_CMD_KEY_NONE)