06.12.2010, 17:04
im having this issue when i attach a car to the tow truck this is really bad synced and on older versions this wasnt? is this familiar?
if (strcmp("/ww", cmdtext, true) == 0) { SetPlayerAttachedObject(playerid,0,18947,2, 0.13,0.015,0.003, 0.0,0.0,0.0, 1.0,1.0,1.0); SetPlayerAttachedObject(playerid,0,19022,2,0.1,0.0 4,0.0,60.0,85.0,25.0,1.0,1.0,1.0); return 1; } |
forward AttachObjectModelToVehicle ( modelid, vehicleid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:RotZ);
new Veh_Object_IDs[MAX_VEHICLES],
Veh_Models_IDs[MAX_VEHICLES];
stock IsObjectAttachedToVehicle( vehicleid )
{
return Veh_Object_IDs[vehicleid];
}
stock GetVehicleObjectModel( vehicleid )
{
return Veh_Models_IDs[vehicleid];
}
stock RemoveObjectFromVehicle( vehicleid )
{
new obj_id = IsObjectAttachedToVehicle( vehicleid );
if( obj_id )
{
DestroyObject(obj_id);
Veh_Object_IDs[vehicleid] = 0;
Veh_Models_IDs[vehicleid] = 0;
}
return 1;
}
public AttachObjectModelToVehicle( modelid, vehicleid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:RotZ)
{
RemoveObjectFromVehicle( vehicleid );
Veh_Object_IDs[vehicleid] = CreateObject(modelid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, RotZ);
Veh_Models_IDs[vehicleid] = modelid;
AttachObjectToVehicle(Veh_Object_IDs[vehicleid], vehicleid, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, RotZ);
return 1;
}