SA-MP Forums Archive
KeyStateChange - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: KeyStateChange (/showthread.php?tid=457155)



KeyStateChange - DRIFT_HUNTER - 09.08.2013

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if((newkeys & KEY_RIGHT) && !(oldkeys & KEY_RIGHT))
	{
	    SendDebug(playerid, "Key Right Detected!");
	}

	if((newkeys == KEY_RIGHT))
	{
	    SendDebug(playerid, "Key Right Detected! (Check 2)");
	}
        return 1;
}
When i connect to server and press right key or D (Walk to right) it does not detect it at all but it detects it when i press space or right aim key...(On foot and in vehicle)

Im not only one...
https://sampforum.blast.hk/showthread.php?tid=457090