Editing Attached Vehicle Object
#1

Is there any way i can edit an attachedvehicleobject ?
Because whenever i try EditObject doesn't work.
Код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
							
Vehicle_Body_Parts_Object[playerid] = CreateObject(Body_Parts[Vehicle_Body_Parts_Button[playerid]], X, Y, Z, 0, 0, 0);
							
SetObjectMaterial(Vehicle_Body_Parts_Object[playerid], 0, -1, "none", "none", 0xFFFFFFFF);
							
AttachObjectToVehicle(Vehicle_Body_Parts_Object[playerid], GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SetTimerEx("TuningTimer", 1600, false, "i", playerid);
Код:
function TuningTimer(playerid){
EditObject(playerid, Vehicle_Body_Parts_Object[playerid]);
}
P.S:I had done a timer for a small delay, in case there is a problem with the seconds between creating-editing object.
Reply
#2

Unfortunately you can't edit an object attached to a vehicle.
Reply
#3

You can, just don't attach it until you've edited it.

If you're only creating the object then you need to AttachObject AFTER editing and placing it.
https://sampforum.blast.hk/showthread.php?tid=641890

You need to grab the offset from OnPlayerEditObject then use it to attach to the vehicle.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)