07.07.2012, 08:09
(
Последний раз редактировалось Gennum.; 07.07.2012 в 08:18.
Причина: wrong
)
Alright then, the problem: when I finish editing the object, I see the edit, but my friend does not see.
The codes:
and the of the public OnPlayerEditAttachedObject
thanks for any help
The codes:
Код HTML:
if (strcmp("/objectmove", cmdtext, true, 10) == 0) { if(yess[playerid] != 1) { SetPlayerAttachedObject(playerid, myobject, 19141, 2, 0.11, 0.0, 0.0, 0.0, 0.0, 0.0); EditAttachedObject(playerid, myobject); yess[playerid] = 1; return 1; } else if(yess[playerid] != 0) { RemovePlayerAttachedObject(playerid, myobject); yess[playerid] = 0; return 1; } return 1; }
Код HTML:
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) { if(response) { SendClientMessage(playerid, 0xFFFFFFFF, "Eden omo ?... looooo"); ao[playerid][index][ao_x] = fOffsetX; ao[playerid][index][ao_y] = fOffsetY; ao[playerid][index][ao_z] = fOffsetZ; ao[playerid][index][ao_rx] = fRotX; ao[playerid][index][ao_ry] = fRotY; ao[playerid][index][ao_rz] = fRotZ; ao[playerid][index][ao_sx] = fScaleX; ao[playerid][index][ao_sy] = fScaleY; ao[playerid][index][ao_sz] = fScaleZ; SetPlayerObjectPos(playerid, index, fOffsetX, fOffsetY, fOffsetZ); SetPlayerObjectRot(playerid, index, fRotX, fRotY, fRotZ); } else { SendClientMessage(playerid, 0xFFFFFFFF, "Attached object edition not saved."); new i = index; SetPlayerAttachedObject(playerid, index, modelid, boneid, ao[playerid][i][ao_x], ao[playerid][i][ao_y], ao[playerid][i][ao_z], ao[playerid][i][ao_rx], ao[playerid][i][ao_ry], ao[playerid][i][ao_rz], ao[playerid][i][ao_sx], ao[playerid][i][ao_sy], ao[playerid][i][ao_sz]); } return 1; }