[solved]
#6

Quote:
Originally Posted by ♣ Joker ♠
pawn Код:
stock bool:IsVehicleDrivingBackwards(vehicleid)
{
    new Float:Float[3];
    if(GetVehicleVelocity(vehicleid, Float[1], Float[2], Float[0])) {
        GetVehicleZAngle(vehicleid, Float[0]);
        if(Float[0] < 90) {
            if(Float[1] > 0 && Float[2] < 0)    return true;
        } else if(Float[0] < 180) {
            if(Float[1] > 0 && Float[2] > 0)    return true;
        } else if(Float[0] < 270) {
            if(Float[1] < 0 && Float[2] > 0)    return true;
        } else if(Float[1] < 0 && Float[2] < 0) return true;
    }
    return false;
}
Not tested but basically it should work (if there isnt any mistake)
Thanks Joker, it works =)
Reply


Messages In This Thread
[solved] - by RyDeR` - 07.04.2010, 20:54
Re: Check if vehicle is driving backwards - by shady91 - 07.04.2010, 20:55
Re: Check if vehicle is driving backwards - by NeRoSiS - 07.04.2010, 23:28
Re: Check if vehicle is driving backwards - by Nero_3D - 08.04.2010, 01:10
Re: Check if vehicle is driving backwards - by shady91 - 08.04.2010, 03:03
Re: Check if vehicle is driving backwards - by RyDeR` - 08.04.2010, 11:25

Forum Jump:


Users browsing this thread: 1 Guest(s)