Vehicle Wheels
#1

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...
Reply
#2

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.
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)