Have you just tried GetAsyncKeyState(VK_NUMPAD1) ... without all the fancy stuff?
If all else fails the game might be resetting it back to zero so you could just set a loop to freeze the value at 100 (not sure why ur not setting it at 1 btw).
As for ur other problem... beats me. Why do u need a MessageBox anyhow?Code:int value = 0; if(GetAsync...(VK_NUMPAD1) & !value) value = 100;else value = 0;while(1) {espbox = valueSleep(1000);}