03.10.2014, 08:24
Nah doin it atm.
EDIT: Can you plss rework this for me ?
EDIT2: Nvm i will do it on my own i got it all thanks for help anyways
EDIT: Can you plss rework this for me ?
EDIT2: Nvm i will do it on my own i got it all thanks for help anyways
PHP Code:
idx = oEditID[playerid];
if(response == EDIT_RESPONSE_UPDATE)
{
SetDynamicObjectPos(objectid, x, y, z);
SetDynamicObjectRot(objectid, rx, ry, rz);
}
else if(response == EDIT_RESPONSE_CANCEL)
{
SetDynamicObjectPos(objectid, oPos[playerid][0], oPos[playerid][1], oPos[playerid][2]);
SetDynamicObjectRot(objectid, oRot[playerid][0], oRot[playerid][1], oRot[playerid][2]);
oPos[playerid][0] = 0; oPos[playerid][1] = 0; oPos[playerid][2] = 0;
oRot[playerid][0] = 0; oRot[playerid][1] = 0; oRot[playerid][2] = 0;
format(string, sizeof(string), " You have canceled editing object ID %d.", idx);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(response == EDIT_RESPONSE_FINAL)
{
SetDynamicObjectPos(objectid, x, y, z);
SetDynamicObjectRot(objectid, rx, ry, rz);
if(oEdit[playerid] == 1)
{
oldoID = ObjInfo[idx][oModel];
ObjInfo[idx][oX] = x;
ObjInfo[idx][oY] = y;
ObjInfo[idx][oZ] = z;
ObjInfo[idx][oRX] = rx;
ObjInfo[idx][oRY] = ry;
ObjInfo[idx][oRZ] = rz;
oldodX = ObjInfo[idx][oX];
oldodY = ObjInfo[idx][oY];
oldodZ = ObjInfo[idx][oZ];
oldodRX = ObjInfo[idx][oRX];
oldodRY = ObjInfo[idx][oRY];
oldodRZ = ObjInfo[idx][oRZ];
if(IsValidDynamic3DTextLabel(ObjInfo[idx][oText])) DestroyDynamic3DTextLabel(ObjInfo[idx][oText]);
format(string, sizeof(string), "Object ID: %d (Model ID: %d)", idx, ObjInfo[idx][oModel]);
ObjInfo[idx][oText] = CreateDynamic3DTextLabel(string, COLOR_WHITE, ObjInfo[idx][oX], ObjInfo[idx][oY], ObjInfo[idx][oZ], 10);
oEdit[playerid] = 0;
oEditID[playerid] = 0;
format(string, sizeof(string), " You have finished editing object ID %d's position.", idx);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}