21.07.2014, 17:51
or
then do
to save alot of variables and code.
pawn Код:
stock ModifyVehicle( vehicleid, objectid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz )
{
new iObject;
iObject = CreateObject( objectid, 0.0, 0.0, 0.0, 0, 0, 0 );
AttachObjectToVehicle( iObject, vehicleid, x, y, z, rx, ry, rz );
return 1;
}
pawn Код:
new
Vehicle
;
// create the vehicle
Vehicle = CreateVehicle( ... );
// add the desired object.
ModifyVehicle( Vehicle, yourobjectid, offsetx, offsety, offsetz, offsetrotx, offsetroty, offsetrotz );
// assign the variable to the new vehicle.
Vehicle = CreateVehicle( ... );
// modify the new vehicle with 2 mods
ModifyVehicle( Vehicle, 69, offsetx, offsety, offsetz, offsetrotx, offsetroty, offsetrotz );
ModifyVehicle( Vehicle, 1337, offsetx, offsety, offsetz, offsetrotx, offsetroty, offsetrotz );