GetXYZInFrontOfVehicle ?
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You need the z (height) and that can be found by GetVehiclePos function. I added + 1 to the current height just to prevent it to be underground. If it's over the ground though, you can remove it.

pawn Код:
GetXYZInFrontOfVehicle(vehicleid, &Float:x, &Float:y, &Float:z, Float:distance)
{
    new Float:a;
    GetVehiclePos(playerid, x, y, z);
    GetVehicleZAngle(playerid, a);
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
    z += 1.0;
}
You don't need the rotations of the vehicle.
You serious? All you've done is adding +1 to Z coord, that is not correct way to do it xD
Reply


Messages In This Thread
GetXYZInFrontOfVehicle ? - by NopeNope - 01.05.2014, 11:07
Re: GetXYZInFrontOfVehicle ? - by JacobEdwards - 01.05.2014, 11:12
Re: GetXYZInFrontOfVehicle ? - by NopeNope - 01.05.2014, 11:28
Re: GetXYZInFrontOfVehicle ? - by Konstantinos - 01.05.2014, 11:33
Re: GetXYZInFrontOfVehicle ? - by NopeNope - 01.05.2014, 11:48
Re: GetXYZInFrontOfVehicle ? - by Konstantinos - 01.05.2014, 11:57
Re: GetXYZInFrontOfVehicle ? - by NopeNope - 01.05.2014, 11:58
Re: GetXYZInFrontOfVehicle ? - by Konstantinos - 01.05.2014, 12:09
Re: GetXYZInFrontOfVehicle ? - by NopeNope - 01.05.2014, 12:21
Re: GetXYZInFrontOfVehicle ? - by CoaPsyFactor - 01.05.2014, 13:34

Forum Jump:


Users browsing this thread: 2 Guest(s)