22.06.2016, 16:26
You can calculate the offset of an object to a vehicle(assuming you already know where you want the object placed) by subtracting the larger offset with the smaller one.
Example(vx, vy, and vz are the offsets):
Example(vx, vy, and vz are the offsets):
pawn Код:
new Float: x, Float: y, Float: z, Float: vx, Float: vy, Float: vz;
GetObjectPos(objectid, x, y, z);
GetVehiclePos(vehicleid, vx, vy, vz);
vx = (x > vx) ? (x) : (vx);
vy= (y > vy) ? (y) : (vy);
vz = (z > vz) ? (z) : (vz);

