25.07.2013, 13:21
new Float:X1,Y1,Z1,X2,Y2,Z2;
GetVehiclePos(vehicleid,X1,Y1,Z1);
GetPlayerPos(playerid,X2,Y2,Z2);
then you need to test:
If(Y2-Y1) = a positive amount then hes at the trunk/hood.
If(Y2-Y1) = a negative amount then hes at the trunk/hood.
should be working like that if the car is at its location always X=0 Y=0 Z=0
-Y is the back of the car
+Y is the front of the car
GetVehiclePos(vehicleid,X1,Y1,Z1);
GetPlayerPos(playerid,X2,Y2,Z2);
then you need to test:
If(Y2-Y1) = a positive amount then hes at the trunk/hood.
If(Y2-Y1) = a negative amount then hes at the trunk/hood.
should be working like that if the car is at its location always X=0 Y=0 Z=0
-Y is the back of the car
+Y is the front of the car