OnPlayerEditAttachedObject problem
#1

Hi,
I have this code:
pawn Код:
else if(EditingWeapon[playerid])
        {
            WeaponDat[playerid][WeaponRotX][b] = fRotX;
            WeaponDat[playerid][WeaponRotY][b] = fRotY;
            WeaponDat[playerid][WeaponRotZ][b] = fRotZ;
            WeaponDat[playerid][WeaponX][b] = fOffsetX;
            WeaponDat[playerid][WeaponY][b] = fOffsetY;
            WeaponDat[playerid][WeaponZ][b] = fOffsetZ;
            printf("%d, %d, %d, %f, %f, %f, %f, %f, %f", index, modelid, boneid, WeaponDat[playerid][WeaponX][b], WeaponDat[playerid][WeaponY][b], WeaponDat[playerid][WeaponZ][b], WeaponDat[playerid][WeaponRotX][b], WeaponDat[playerid][WeaponRotY][b], WeaponDat[playerid][WeaponRotZ][b]);
            //RemovePlayerAttachedObject(playerid, d);
            //SetPlayerAttachedObject(playerid, d, modelid, boneid,WeaponDat[playerid][WeaponX][b], WeaponDat[playerid][WeaponY][b], WeaponDat[playerid][WeaponZ][b], WeaponDat[playerid][WeaponRotX][b], WeaponDat[playerid][WeaponRotY][b], WeaponDat[playerid][WeaponRotZ][b]);
            EditingWeapon[playerid] = false;
        }
This is meant whenever a player confirms an edit of the attached object on him, but the values are reversed. The Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ become Float:fRotX, Float:fRotY, Float:fRotZ and vice versa. I noticed it when I debugged it on the printf function. Can anyone tell me why does it happen?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)