Getting position behind vehicle
#2

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(1225VehicleX DISTANCE floatsin(-angledegrees), VehicleY DISTANCE floatcos(-angledegrees), vehicleZ 1.00.00.0angle); 
Reply


Messages In This Thread
Getting position behind vehicle - by TEKNOJIHAD1 - 20.06.2017, 20:56
Re: Getting position behind vehicle - by Vince - 20.06.2017, 21:12
Re: Getting position behind vehicle - by TEKNOJIHAD1 - 20.06.2017, 21:42
Re: Getting position behind vehicle - by Eoussama - 20.06.2017, 21:53

Forum Jump:


Users browsing this thread: 1 Guest(s)