Trunk Coordinates
#5

I have used MP2's function which is:

pawn Code:
stock GetPosBehindVehicle (vehicleid, &Float:x, &Float:y, &Float:z, Float:offset=0.5)
{
      new Float:vehicleSize[3], Float:vehiclePos[3];
      GetVehiclePos(vehicleid, vehiclePos[0], vehiclePos[1], vehiclePos[2]);
      GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_SIZE,vehicleSize[0],vehicleSize[1], vehicleSize[2]);
      GetXYBehindVehicle(vehicleid, vehiclePos[0], vehiclePos[1], (vehicleSize[1]/2)+offset);
      x = vehiclePos[0];
      y = vehiclePos[1];
      z = vehiclePos[2];
      return 1;
}

GetXYBehindVehicle(vehicleid, &Float:q, &Float:w, Float:distance)
{
      new Float:a;
      GetVehiclePos(vehicleid, q, w, a);
      GetVehicleZAngle(vehicleid, a);
      q += (distance * -floatsin(-a, degrees));
      w += (distance * -floatcos(-a, degrees));
}
But I'm not sure what to do from here. Do I use IsPlayerInRangeOfPoint of GetPosBehindVehicle? Thanks.

I'm sorry there's loose indents in the code but I had to type it up on mobile cause no Internet access.
Reply


Messages In This Thread
Trunk Coordinates - by AphexCCFC - 12.09.2013, 04:26
Re: Trunk Coordinates - by WopsS - 12.09.2013, 05:50
Re: Trunk Coordinates - by AphexCCFC - 12.09.2013, 06:52
Re: Trunk Coordinates - by Misiur - 12.09.2013, 07:41
Re: Trunk Coordinates - by AphexCCFC - 12.09.2013, 16:03
Re: Trunk Coordinates - by AphexCCFC - 12.09.2013, 17:45
Re: Trunk Coordinates - by Kirollos - 13.09.2013, 00:02
Re: Trunk Coordinates - by AphexCCFC - 13.09.2013, 00:19
Re: Trunk Coordinates - by Kirollos - 13.09.2013, 00:21
Re: Trunk Coordinates - by AphexCCFC - 13.09.2013, 01:17

Forum Jump:


Users browsing this thread: 1 Guest(s)