Repair vehicle from behind.
#8

Quote:
Originally Posted by Joe Staff
Посмотреть сообщение
You can try this
pawn Код:
stock IsPlayerInFrontVehicle(playerid,vehicleid,Float:radius,Float:vehiclelength)
{
  new Float:x,Float:y,Float:z,Float:a;
  GetVehiclePos(vehicleid, x, y, z);
  GetPlayerFacingAngle(vehicleid, a);
  x += (vehiclelength* floatsin(-a, degrees));
  y += (vehiclelength* floatcos(-a, degrees));
  return IsPlayerInRangeOfPoint(playerid,radius,x,y,z);
}
'vehiclelength' would be the distance between the middle of the car to the front/back of it. (In your case you would set this to a negative number, i.e. -4.0)
'radius' would be the area of the spot inwhich the player must be. (i.e. 3.0)
That could help.
Reply


Messages In This Thread
Repair vehicle from behind. - by DownDuckling - 19.09.2014, 20:14
Re: Repair vehicle from behind. - by PMH - 19.09.2014, 20:20
Re: Repair vehicle from behind. - by TakeiT - 19.09.2014, 20:24
Re: Repair vehicle from behind. - by PMH - 19.09.2014, 20:24
Re: Repair vehicle from behind. - by DownDuckling - 19.09.2014, 20:28
Re: Repair vehicle from behind. - by PMH - 19.09.2014, 20:35
Re: Repair vehicle from behind. - by TakeiT - 19.09.2014, 20:36
Re: Repair vehicle from behind. - by Marricio - 19.09.2014, 20:45

Forum Jump:


Users browsing this thread: 1 Guest(s)