public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ new targetid = GetPlayerTargetPlayer(playerid); if (targetid != INVALID_PLAYER_ID) { // Perform a key check here. }}