30.10.2016, 21:06
(
Последний раз редактировалось Ivan_Ino; 31.10.2016 в 13:06.
)
VehiclePartPosition
This is include but more like just function which allows you to get exact position for next parts of any vehicle
Left front tire
Right front tire
Left rear tire
Right rear tire
Hood
Trunk
Function:
Код:
GetXYZOfVehiclePart(vehicleid, part, &Float:x, &Float:y, &Float:z, Float:offset = 0.5)
Код:
* vehicleid - Id of vehicle * part - Part (https://github.com/Ino42O/VehiclePar...sition.inc#L43), * &Float:x - Out var * &Float:y - Out var * &Float:z - Out var * Float:offset = 0.5 - Side offset with default value
Create a car with next command:
Код:
new car; CMD:car(playerid, params[]) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); car = CreateVehicle(strval(params), x, y+5.0, z, 0.0, -1, -1, 0); return 1; }
Код:
CMD:part(playerid, params[]) { new Float:x, Float:y, Float:z; GetXYZOfVehiclePart(car, strval(params), x, y, z); SetPlayerPos(playerid, x, y, z); return 1; }
31/10/2016
- Support if vehicle is not on flat ground (ColAndreas)
Download
https://github.com/Ino42O/VehiclePartPosition