29.03.2014, 17:38
That's the end of OnDialogResponse, the next one is this:
If needed, that's the beginning of OnDialogResponse:
pawn Код:
public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ)
{
new Float:oldX, Float:oldY, Float:oldZ,Float:oldRotX, Float:oldRotY, Float:oldRotZ;
GetDynamicObjectPos(objectid, oldX, oldY, oldZ);
GetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
if(response == EDIT_RESPONSE_FINAL)
{
SetDynamicObjectPos(objectid, fX, fY, fZ);
SetDynamicObjectRot(objectid, fRotX, fRotY, fRotZ);
ObjectInfo[editingobject[playerid]][x] = fX;
ObjectInfo[editingobject[playerid]][y] = fY;
ObjectInfo[editingobject[playerid]][z] = fZ;
ObjectInfo[editingobject[playerid]][rx] = fRotX;
ObjectInfo[editingobject[playerid]][ry] = fRotY;
ObjectInfo[editingobject[playerid]][rz] = fRotZ;
SaveObject(editingobject[playerid]);
editingobject[playerid] = 999;
}
if(response == EDIT_RESPONSE_CANCEL)
{
SetDynamicObjectPos(editingobject[playerid], oldX, oldY, oldZ);
SetDynamicObjectRot(editingobject[playerid], oldRotX, oldRotY, oldRotZ);
editingobject[playerid] = 999;
}
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new f_name[128];
format(f_name,sizeof(f_name),"{00c982}FACTION EDIT - {b7ba00}%s",FactionInfo[Editing[playerid]][fName]);
print("DEBUG");
switch(dialogid)
{