13.05.2011, 09:34
You could try this:
pawn Код:
#define HOLDING(%0) \
((newkeys & (%0)) == (%0))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
if(HOLDING(KEY_FIRE) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 407) {
new
Float: fAimingCoords[3];
GetPlayerCameraPos(playerid, fAimingCoords[0], fAimingCoords[1], fAimingCoords[2]);
/* the player is aiming at: fAimingCoords[0], fAimingCoords[1], fAimingCoords[2] */
}
return 1;
}