Nothing happens with OnPlayerEditDynamicObject?
#1

pawn 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;
    if(response == EDIT_RESPONSE_FINAL)
    {
        GetDynamicObjectPos(objectid, oldX, oldY, oldZ);
        GetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
        if(FurniOwner[objectid] > 0)
        {
            printf("%d ID", objectid);
            new id = FurniSQLID[objectid];
            printf("%d OWNER", FurniOwner[objectid]);
            FurniX[id] = oldX;
            FurniY[id] = oldY;
            FurniZ[id] = oldZ;
            FurniXR[id] = oldRotX;
            FurniYR[id] = oldRotY;
            FurniZR[id] = oldRotZ;
            SetDynamicObjectPos(objectid, FurniX[id], FurniY[id], FurniZ[id]);
            SetDynamicObjectRot(objectid, FurniXR[id], FurniYR[id], FurniZR[id]);
            new query[256];
            format(query, sizeof(query), "UPDATE `furniture` SET FurniX = %f, FurniY = %f, FurniZ = %f, FurniXR = %f, FurniYR = %f, FurniZR = %f WHERE id = %d LIMIT 1",FurniX[id], FurniY[id], FurniZ[id], FurniXR[id], FurniYR[id], FurniZR[id], id);
            mysql_query(query);
            new string[128];
            format(string, sizeof(string), "Furniture position edited to:  %f, %f, %f",FurniX[id], FurniY[id], FurniZ[id]);
            SendClientMessage(playerid, COLOUR_ORANGE, string);
        }
    }
    return 1;
}
Title says all.

I don't believe there's any issues with my code, as it worked before with OnPlayerEditObject.

Thanks.
Reply
#2

Some other guy had similar problem: https://sampforum.blast.hk/showthread.php?tid=566030 - seems streamer specific issue
Reply
#3

I've already got an issue with this but it was fixed, I don't know how but you have to put a newer version of the streamer.
Reply
#4

I managed to resolve this issue. It's to do with the co-ordinates.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)