Detecting where a Fire Truck is throwing water
#1

Is there actually any sort of way to detect where a vehicle is aiming once it shoots?

I am talking about vehicles like the fire truck or even the tank - which I guess could be pretty much the same, except for the fact that the fire truck just keeps firing while the tank has a certain maximum frequency.

So... any ideas? I'd be fine with just knowing the angles for x,y and z.
Reply
#2

I don't know maybe there is a chance.
Well u could get the angle of the player to see which way he is fAcing
[b]GetPlayerFacingAngle[\b]
Reply
#3

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;
}
Reply
#4

GetPlayerCameraFrontVector
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)