editdynamicobject
#1

I don't know how can i use editdynamicobject... I searched this forum but nothing...

Here is mine code:
pawn Код:
//On top of the gamemode
new kapa1;
new kapa2;
new kapa3;
new kapa4;
new kapa5;

//Under OnGameModeInIt
kapa1 = CreateDynamicObject(18939, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
kapa2 = CreateDynamicObject(18940, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
kapa3 = CreateDynamicObject(18941, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
kapa4 = CreateDynamicObject(18942, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
kapa5 = CreateDynamicObject(18943, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);

//Under OnPlayerCommandText
    if(strcmp(cmd, "/kupit", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (!PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))//centerpoint 24-7
            {
                SendClientMessage(playerid, BLCRVENA, "{F20000}GRESKA: {FFFFFF}Ne se naogjate vo 24/7 Market !");
                return 1;
            }
            new marketstring[126];
            new marketstring1[126];
            new marketstring2[364];
            format(marketstring, sizeof(marketstring), "Kapa 1\nKapa 2\nKapa 3\nKapa 4\nKapa 5");
            format(marketstring2, sizeof(marketstring2), "%s",marketstring,marketstring1);
            ShowPlayerDialog(playerid, 14046, DIALOG_STYLE_LIST,"|° ToolShop °|",marketstring2,"Kupi","Otkazi");
        }
        return 1;
    }

//in the dialog
    if(dialogid == 14046)
    {
        if(response)
        {
            if(listitem == 0)
            {
                EditDynamicObject(playerid, kapa1);
            }
            if(listitem == 1)
            {
                EditDynamicObject(playerid, kapa2);
            }
            if(listitem == 2)
            {
                EditDynamicObject(playerid, kapa3);
            }
            if(listitem == 3)
            {
                EditDynamicObject(playerid, kapa4);
            }
            if(listitem == 4)
            {
                EditDynamicObject(playerid, kapa5);
            }
        }
    }
When i write /kupit the dialog is showing but when i click one of the options nothing happens...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)