SA-MP Forums Archive
EditDynamicObject bug ?! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: EditDynamicObject bug ?! (/showthread.php?tid=569065)



EditDynamicObject bug ?! - SpaMaster - 27.03.2015

You can see in the video down. When I click on the Furniture ID first time after connecting to the server, object doubles up by itself.
[ame="http://www.youtube.com/watch?v=o0mmY3Uak24"]http://www.youtube.com/watch?v=o0mmY3Uak24[/ame]

DIALOG_FURNITURELE is for editing, and listitem when the DIALOG_FURNITURELE is called.
pawn Код:
else if(listitem == 3)
{
    new obj[512];
    new h = PlayerInfo[playerid][pHouseKey];
    for(new oh = 0; oh < 50; oh++)
    {
        if(HouseInfo[h][hExtObjects][oh] != 0)
        {
            format(obj, sizeof(obj), "%s\nFurniture ID: %d", obj, HouseInfo[h][hFurnObjID][oh]);
        }
    }
    ShowPlayerDialog(playerid, DIALOG_FURNITURELE, DIALOG_STYLE_LIST, "Kuca - eksterijer", obj, "Izaberi", "Izadji");
}





case DIALOG_FURNITURELE:
{
    if(response)
    {
        new h = PlayerInfo[playerid][pHouseKey];
        pFurniture[playerid] = HouseInfo[h][hFurnObject][listitem];
        pFurnObject[playerid] = HouseInfo[h][hExtObjects][listitem];
        EditDynamicObject(playerid, pFurniture[playerid]);
    }
}



Re: EditDynamicObject bug ?! - SpaMaster - 28.03.2015

Third page, thread up.


Re: EditDynamicObject bug ?! - maximthepain - 28.03.2015

Can you show us the code where pFurniture[playerid] = CreateDynamicObject(...) called? I think it will help to see the bigger picture of this issue.