20.06.2017, 21:12
There are plenty of implementations of GetXYInFrontOfPlayer that you can use. The only thing you need to do is change what exactly "the front" is. If you want something to the left you add 90 degrees to the facing angle, if you want something to the right you subtract 90 degrees from the facing angle and if you want something to the back then you either add or remove 180 to/from the facing angle (a circle being 360 degrees). GTA SA angles go counter clockwise for some odd reason which is why the angles are reversed.
PHP код:
new const Float:DISTANCE = 2.0;
new Float:angle = GetVehicleZAngle(PlayerKartID) - 180.0;
CreateObject(1225, VehicleX + DISTANCE * floatsin(-angle, degrees), VehicleY + DISTANCE * floatcos(-angle, degrees), vehicleZ + 1.0, 0.0, 0.0, angle);