Help, Create a Function.
#1

Help, I want create a function for get future coordinates of a vehicle, for example:

Код:
GetFutureCordsVehicle(vehicleid,  &Float: x, &Float:y); // It depend of angle for get the new position.
PS: Sorry for my English, I wait than help me.
Reply
#2

I think this is what you want
Код:
stock GetXYInfrontOfVehicle(vehicleid,Float:distance, &Float:x, &Float:y)
{
  new Float:z, Float:angle;
  GetVehiclePos(vehicleid,x,y,z);
  GetVehicleZAngle(vehicleid,angle);
  x += (distance * floatsin(-angle, degrees));
  y += (distance * floatcos(-angle, degrees));
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)