25.03.2019, 22:00
Tried to, already close, but would still not accurately
PHP код:
new
Float:fPX, Float:fPY, Float:fPZ,
Float:fVX, Float:fVY, Float:fVZ,
Float:object_z,Float:zzz;
const
Float:disttt = 2.75;
GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);
GetPlayerFacingAngle(playerid,zzz);
object_z = fPZ + floatmul(fVZ, disttt);
CreateObject(2707, fPX+disttt*-floatsin(zzz,degrees), fPY+disttt*floatcos(zzz,degrees), object_z+0.14, 0.0000000,0.0000000,0.0000000, 100); // my origin
CreateObject(2707, unoccupiedData[PR_origin][0],unoccupiedData[PR_origin][1],unoccupiedData[PR_origin][2], 0.0000000,0.0000000,0.0000000, 100); // origin