05.01.2016, 17:05
The issue is in the title.
Video of the object disappearing: https://www.youtube.com/watch?v=ro_R...ature=*********
OnPlayerEditObject:
Video of the object disappearing: https://www.youtube.com/watch?v=ro_R...ature=*********
OnPlayerEditObject:
Код:
new carid = GetPVarInt(playerid, "carID"), carSlot = GetPVarInt(playerid, "carSlot");
if(carid)
{
if(response != EDIT_RESPONSE_UPDATE)
{
if (response == EDIT_RESPONSE_FINAL)
{
if (IsValidObject(CarData[carid][carObjectEx][carSlot]))
{
carObjectPos[carid][carSlot][0] = fX;
carObjectPos[carid][carSlot][1] = fY;
carObjectPos[carid][carSlot][2] = fZ;
carObjectPos[carid][carSlot][3] = fRotX;
carObjectPos[carid][carSlot][4] = fRotY;
carObjectPos[carid][carSlot][5] = fRotZ;
AttachObjectToVehicle(CarData[carid][carObjectEx][carSlot], CarData[carid][carVehicle], fX, fY, fZ, fRotX, fRotY, fRotZ);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "%s placed.", ReturnWeaponName(CarData[carid][carWeapons][carSlot]));
}
else SendServerMessage(playerid, "Found an error. Report this bug on the forums. (could not find object)");
}
else if (response == EDIT_RESPONSE_CANCEL)
{
if (IsValidObject(CarData[carid][carObjectEx][carSlot]))
{
carObjectPos[carid][carSlot][3] = 0.0;
carObjectPos[carid][carSlot][4] = 0.0;
carObjectPos[carid][carSlot][5] = 0.0;
AttachObjectToVehicle(CarData[carid][carObjectEx][carSlot], CarData[carid][carVehicle], carObjectPos[carid][carSlot][0], carObjectPos[carid][carSlot][1], carObjectPos[carid][carSlot][2], 0.0, 0.0, 0.0);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "%s placed.", ReturnWeaponName(CarData[carid][carWeapons][carSlot]));
}
else SendServerMessage(playerid, "Found an error. Report this bug on the forums. (could not find object)");
}
DeletePVar(playerid, "carID");
DeletePVar(playerid, "carSlot");
Car_Refresh(carid);
}
}

