09.12.2012, 20:30
Hi,
Why this function don't work in game.
Why this function don't work in game.
GetDynamicObjectPos(objectid, &Float:X, &Float:Y, &Float:Z)
public OnPlayerEditDynamicObject(playerid,objectid, response, Float:x12, Float:y12, Float:z12, Float:rx12, Float:ry12, Float:rz12) { new Float:oldX, Float:oldY, Float:oldZ, Float:oldRotX, Float:oldRotY, Float:oldRotZ; GetDynamicObjectPos(objectid, oldX, oldY, oldZ); GetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ); if(!IsValidDynamicObject(objectid)) return; MoveDynamicObject(objectid, x12, y12, z12, 10.0, rx12, ry12, rz12); if(response == EDIT_RESPONSE_FINAL) { } if(response == EDIT_RESPONSE_CANCEL) { SetDynamicObjectPos(objectid, oldX, oldY, oldZ); SetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ); } }