Guten Tag,
ich habe ein Problem - mit meinem Code, welcher hier drunter zufinden sein wird, wird im Spiel der genannte Befehl einfach nicht getätigt!
Kann mir einer sagen warum?
Code
while(1)
{
if(GetAsyncKeyState(VK_NUMPAD1))
{
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VkKeyScan('/'),0x9e,0 , 0);
keybd_event(VkKeyScan('z'),0x9e,0 , 0);
keybd_event(VkKeyScan('o'),0x9e,0 , 0);
keybd_event(VkKeyScan('l'),0x9e,0 , 0);
keybd_event(VkKeyScan('l'),0x9e,0 , 0);
keybd_event(VK_RETURN,0x1c,0,0);
Sleep(100);
}
if(GetAsyncKeyState(VK_NUMPAD2))
{
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VkKeyScan('/'),0x9e,0,0);
keybd_event(VkKeyScan('a'),0x9e,0,0);
keybd_event(VkKeyScan('u'),0x9e,0,0);
keybd_event(VkKeyScan('s'),0x9e,0,0);
keybd_event(VkKeyScan('r'),0x9e,0,0);
keybd_event(VkKeyScan('u'),0x9e,0,0);
keybd_event(VkKeyScan('e'),0x9e,0,0);
keybd_event(VkKeyScan('s'),0x9e,0,0);
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VkKeyScan('e'),0x9e,0,0);
keybd_event(VkKeyScan('n'),0x9e,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
Sleep(100);
}
if(GetAsyncKeyState(VK_NUMPAD3))
{
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VK_CAPITAL, 0x9e,0,0);
keybd_event(VkKeyScan('/'),0x9e,0,0);
keybd_event(VK_CAPITAL, 0x9e,0,0);
keybd_event(VkKeyScan('m'),0x9e,0,0);
keybd_event(VkKeyScan('o'),0x9e,0,0);
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VkKeyScan('o'),0x9e,0,0);
keybd_event(VkKeyScan('r'),0x9e,0,0);
keybd_event(VK_RETURN,0x9e,0,0);
Sleep(100);
}
if(GetAsyncKeyState(VK_NUMPAD4))
{
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VkKeyScan('/'),0x9e,0,0);
keybd_event(VkKeyScan('l'),0x9e,0,0);
keybd_event(VkKeyScan('o'),0x9e,0,0);
keybd_event(VkKeyScan('c'),0x9e,0,0);
keybd_event(VkKeyScan('k'),0x9e,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
Sleep(100);
}
if(GetAsyncKeyState(VK_NUMPAD5))
{
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VkKeyScan('/'),0x9e,0,0);
keybd_event(VkKeyScan('h'),0x9e,0,0);
keybd_event(VkKeyScan('e'),0x9e,0,0);
keybd_event(VkKeyScan('a'),0x9e,0,0);
keybd_event(VkKeyScan('l'),0x9e,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
Sleep(100);
}
if(GetAsyncKeyState(VK_NUMPAD6))
{
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VkKeyScan('/'),0x9e,0,0);
keybd_event(VkKeyScan('e'),0x9e,0,0);
keybd_event(VkKeyScan('r'),0x9e,0,0);
keybd_event(VkKeyScan('s'),0x9e,0,0);
keybd_event(VkKeyScan('t'),0x9e,0,0);
keybd_event(VkKeyScan('e'),0x9e,0,0);
keybd_event(VkKeyScan('h'),0x9e,0,0);
keybd_event(VkKeyScan('i'),0x9e,0,0);
keybd_event(VkKeyScan('l'),0x9e,0,0);
keybd_event(VkKeyScan('f'),0x9e,0,0);
keybd_event(VkKeyScan('e'),0x9e,0,0);
keybd_event(VK_RETURN,0x1c,0,0);
Sleep(100);
}
Sleep(50);
}
Alles anzeigen