Getting Player's Camera Look At
#9

Ah, got it:

pawn Код:
GetVehiclePos(GetPlayerVehicleID(playerid), x1, y1, z1);
//...
dX = cPosX + floatmul(cX, Dist);
dY = cPosY + floatmul(cY, Dist);
dZ = cPosZ + floatmul(cZ, Dist);
if(GetDistanceBetweenPoints(x1, y1, z1, dX, dY, dZ) <= 50.0)
You compare the calculated point to the vehicle pos, not the fire pos. Replace the x1,y1,z1 in the upper line by x2,y2,z2 (and do <= 5.0 or 10.0 as well)
Reply


Messages In This Thread
Getting Player's Camera Look At - by Maxips2 - 04.10.2010, 16:15
Re: Getting Player's Camera Look At - by samgreen - 04.10.2010, 16:37
Re: Getting Player's Camera Look At - by zfkdaniel - 04.10.2010, 18:57
Re: Getting Player's Camera Look At - by Maxips2 - 04.10.2010, 19:35
Re: Getting Player's Camera Look At - by Mauzen - 05.10.2010, 12:21
Re: Getting Player's Camera Look At - by Maxips2 - 05.10.2010, 13:29
Re: Getting Player's Camera Look At - by Mauzen - 05.10.2010, 13:35
Re: Getting Player's Camera Look At - by Maxips2 - 05.10.2010, 14:08
Re: Getting Player's Camera Look At - by Mauzen - 05.10.2010, 14:15
Re: Getting Player's Camera Look At - by Maxips2 - 05.10.2010, 14:18

Forum Jump:


Users browsing this thread: 1 Guest(s)