20.06.2017, 21:42
It works perfectly but I had to modify it a little to fix some warnings here is the code in case anyone needs it:
Thanks alot
PHP код:
new Float:VehicleX;
new Float:VehicleY;
new Float:VehicleZ;
new PlayerKartID = GetPlayerVehicleID(playerid);
GetVehiclePos(PlayerKartID, VehicleX, VehicleY, VehicleZ);
new const Float:DISTANCE = 2.0;
new Float:angle;
GetVehicleZAngle(PlayerKartID,angle);
angle = angle-180.0;
new Float:F_FLOATSIN = floatsin(-angle, degrees);
new Float:F_FLOATCOS = floatcos(-angle, degrees);
CreateObject(1225, VehicleX + DISTANCE * F_FLOATSIN, VehicleY + DISTANCE * F_FLOATCOS, VehicleZ, 0.0, 0.0, 125.0);