SA-MP Forums Archive
Object editor (While attached to vehicles) - 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: Object editor (While attached to vehicles) (/showthread.php?tid=430116)



Object editor (While attached to vehicles) - Pizzy - 12.04.2013

I have tried doing this, although I didn\'t succeed.


Could anyone confirm that editing objects, while attached to vehicles works? I\'d like to make a custom tuning system, and would severely help if I could edit an object, WHILE it were attached to the vehicle.



Any responses appreciated - Please & Thanks!


Re: Object editor (While attached to vehicles) - Pottus - 12.04.2013

You need it all command based.

Code:
// Vehicle Object Movement X-Axis
CMD:mvox(playerid, arg[])
{
	new Float:Movement;
	if(isnull(arg)) Movement = 1.0;
	else sscanf(arg, "f", Movement);

	if(EditCar[playerid][cVID] == INVALID_VEHICLE_ID || vehicles[playerid][MVASel[playerid]][object_id] == INVALID_OBJECT_ID) return 1;

	vehicles[playerid][MVASel[playerid]][ox] += Movement;
	AttachObjectToVehicle(vehicles[playerid][MVASel[playerid]][object_id], EditCar[playerid][cVID], vehicles[playerid][MVASel[playerid]][ox], vehicles[playerid][MVASel[playerid]][oy], vehicles[playerid][MVASel[playerid]][oz], vehicles[playerid][MVASel[playerid]][rx], vehicles[playerid][MVASel[playerid]][ry], vehicles[playerid][MVASel[playerid]][rz]);

	return 1;
}
1.) Set movement in enum

2.) AttachObject


Re: Object editor (While attached to vehicles) - Pizzy - 12.04.2013

Ah, so it\'s not possible to use the in-game editor? :/, that\'s a shame.

Oh well - thanks!