17.02.2014, 03:51
pawn Код:
public OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid,
Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
Float:fRotX, Float:fRotY, Float:fRotZ,
Float:fScaleX, Float:fScaleY, Float:fScaleZ )
{
new id = editingObjectSlot[playerid];
if(editingObjectSlot[playerid] == -1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Error");
return 1;
}
new str[128];
custom_Base[playerid][editingObjectSlot[playerid]][cPos_X] = Float:fOffsetX;
custom_Base[playerid][editingObjectSlot[playerid]][cPos_Y] = Float:fOffsetY;
custom_Base[playerid][editingObjectSlot[playerid]][cPos_Z] = Float:fOffsetZ;
custom_Base[playerid][editingObjectSlot[playerid]][cRot_X] = Float:fRotX;
custom_Base[playerid][editingObjectSlot[playerid]][cRot_Y] = Float:fRotY;
custom_Base[playerid][editingObjectSlot[playerid]][cRot_Z] = Float:fRotZ;
custom_Base[playerid][editingObjectSlot[playerid]][cScale_X] = Float:fScaleX;
custom_Base[playerid][editingObjectSlot[playerid]][cScale_Y] = Float:fScaleY;
custom_Base[playerid][editingObjectSlot[playerid]][cScale_Z] = Float:fScaleZ;
format(str, sizeof(str), "UP %d", editingObjectSlot[playerid]);
SendClientMessage(playerid, -1, str);
format(_string, sizeof(_string), "UPDATE objetos SET cPosX = %f, cPosY = %f, cPosZ = %f, cRotX = %f, cRotY = %f, cRotZ = %f, cScaleX = %f, cScaleY = %f, cScaleZ = %f WHERE playerobjectid = %d AND Dono = '%s'",
custom_Base[playerid][editingObjectSlot[playerid]][cPos_X],custom_Base[playerid][editingObjectSlot[playerid]][cPos_Y],custom_Base[playerid][editingObjectSlot[playerid]][cPos_Z],
custom_Base[playerid][editingObjectSlot[playerid]][cRot_X],custom_Base[playerid][editingObjectSlot[playerid]][cRot_Y],custom_Base[playerid][editingObjectSlot[playerid]][cRot_Z],
custom_Base[playerid][editingObjectSlot[playerid]][cScale_X],custom_Base[playerid][editingObjectSlot[playerid]][cScale_Y],custom_Base[playerid][editingObjectSlot[playerid]][cScale_Z],editingObjectSlot[playerid],GetUserName(playerid));
mysql_function_query(MYSQLConnection, _string, false, "noReturnQuery", "d", 8);
RemovePlayerAttachedObject(playerid, custom_Base[playerid][id][cSlot]);
SetPlayerAttachedObject(playerid,custom_Base[playerid][id][cSlot],custom_Base[playerid][id][cObjeto],custom_Base[playerid][id][cBone],
custom_Base[playerid][id][cPos_X], custom_Base[playerid][id][cPos_Y],custom_Base[playerid][id][cPos_Z],
custom_Base[playerid][id][cRot_X], custom_Base[playerid][id][cRot_Y],custom_Base[playerid][id][cRot_Z],
custom_Base[playerid][id][cScale_X], custom_Base[playerid][id][cScale_Y],custom_Base[playerid][id][cScale_Z]);
return 1;
}
Alguйm poderia achar algum erro no script?