23.04.2015, 09:45
(
Last edited by Colhisberg; 23/04/2015 at 10:15 AM.
)
This is what I use;
Code:
public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) { 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, x, y, z); SetDynamicObjectRot(objectid, rx, ry, rz); } if(response == EDIT_RESPONSE_CANCEL) { SetDynamicObjectPos(objectid, oldX, oldY, oldZ); SetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ); } return 1; }