SA-MP Forums Archive
Vehicle Wheels - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Wheels (/showthread.php?tid=543068)



Vehicle Wheels - Ph0eniX - 24.10.2014

Hi all , i tryed to make something but i failed. How can i do to get automaticali wheels pos from any vehicle?

Ex: If i'm in vehicle infernus to get automaticali pos from all 4 wheels at "terra".

If i'm in vehicle dumper to get automaticali pos from wheels at " terra".

I don't understand this functiones: x += (floatcos(vehAngle, degrees) * wheelOffset etc...


Re: Vehicle Wheels - Threshold - 24.10.2014

Quote:
Originally Posted by Threshold
Посмотреть сообщение
This is what I've briefly made. Now we just wait for a better scripter to make this smaller and more efficient.

Removed post, please message me if you want the code for GetVehicleWheelPos.[/pawn]

Tested and works. Credit to Mauzen for some of his code in GetVehicleRelativePos.
For example, if you wanted to get the position of the front left tyre:
pawn Код:
new Float:x, Float:y, Float:z;
GetVehicleWheelPos(GetPlayerVehicleID(playerid), WHEELSFRONT_LEFT, x, y, z);
SetPlayerCheckpoint(playerid, x, y, z, 0.5); //Sets a checkpoint at the wheel
Note that if you try to get the position of a middle tyre and the vehicle does not have middles tyres, it will return the middle of the vehicle.


Re: Vehicle Wheels - Ph0eniX - 24.10.2014

Ty but ... i don't want like that , i want to use AttachObjectToVehicle ... you know what i mind.