04.01.2015, 20:51
Hello. I have an error with OnPlayerKeyCahgen..
When i press KEY_CTRL_BACK its print z-, up, left
WHen i press KEY_NO its print z+, up, left
And when press KEY_UP, KEY_DOWN, KEY_RIGHT, KEY_LEFT its not print anything.. Why? Someone please help me... Thanks!
When i press KEY_CTRL_BACK its print z-, up, left
WHen i press KEY_NO its print z+, up, left
And when press KEY_UP, KEY_DOWN, KEY_RIGHT, KEY_LEFT its not print anything.. Why? Someone please help me... Thanks!
Код:
if (PRESSED( KEY_CTRL_BACK )) { printf("z+"); } if (PRESSED( KEY_NO )) { printf("z-"); } if (PRESSED( KEY_UP )) { printf("up"); if ((newkeys & KEY_DOWN) && !(oldkeys & KEY_DOWN)) { printf("down"); } if ((newkeys & KEY_LEFT) && !(oldkeys & KEY_LEFT)) { printf("left"); } if ((newkeys & KEY_RIGHT) && !(oldkeys & KEY_RIGHT)) { printf("right"); }