Dialog list furniture
#1

Good evening, how can I make the dialog below be in multiple lists? I mean I add in a dialog (example: 25 lines in 5 pages), thank you!


OnDialogResponse
PHP код:
        if(listitem == 0)
        {
            new list[
2048];
            
format(list, sizeof(list), ""C_ALB"#\t"C_ALB"Obiect\t"C_ALB"Pret\n");
            for(new 
isizeof(HouseFurnitures); ++i)
            {
                
format(list, sizeof(list), "%s%d\t%s\t"C_MONE"$%s\n", list, i+1HouseFurnitures[i][Name], convertNumber(HouseFurnitures[i][Price]));
            }
           
ShowPlayerDialog(playeridDIALOG_FURNITURE_BUYDIALOG_STYLE_TABLIST_HEADERS""C_DIA"Meniu casa", list, "Buy""Back");
        }
        if(
listitem == 0)
        {
            new list[
2048];
            
format(list, sizeof(list), ""C_ALB"#\t"C_ALB"Obiect\t"C_ALB"Pret\n");
            for(new 
isizeof(HouseFurnitures); ++i)
            {
                
format(list, sizeof(list), "%s%d\t%s\t"C_MONE"$%s\n", list, i+1HouseFurnitures[i][Name], convertNumber(HouseFurnitures[i][Price]));
            }
           
ShowPlayerDialog(playeridDIALOG_FURNITURE_BUYDIALOG_STYLE_TABLIST_HEADERS""C_DIA"Meniu casa", list, "Buy""Back");
        } 
PHP код:
    if(dialogid == DIALOG_FURNITURE_BUY)
    {
        if(!
response) return ShowHouseMenu(playerid);
        new 
id InHouse[playerid];
        if(
id == INVALID_HOUSE_ID) return SCM(playerid0xE74C3CFF""C_SRV"SERVER:"C_TXT" Nu va aflati in casa dvs. personala.");
        if(
strcmp(HouseData[id][Owner], Player_GetName(playerid))) return SCM(playerid0xE74C3CFF""C_SRV"SERVER:"C_TXT" Nu esti proprietarul acesti case personale.");
        if(
HouseData[id][SalePrice] > 0) return SCM(playerid0xE74C3CFF""C_SRV"SERVER:"C_TXT" Atata timp cat casa dvs. este pusa in vanzare nu puteti folosi aceasta actiune.");
        if(
HouseFurnitures[listitem][Price] > GetPlayerMoney(playerid)) return SCM(playerid0xE74C3CFF""C_SRV"SERVER:"C_TXT" Nu ai suficienti bani pentru a utiliza aceasta actiune!");
        
GivePlayerCash(playerid, -HouseFurnitures[listitem][Price]);
        
Update(playeridpCashx);
        
format(stringssizeof(strings), "~r~-%s",FormatNumber(HouseFurnitures[listitem][Price]));
        
GameTextForPlayer(playeridstrings50003);
        
SCM(playerid0xFFFFFFFF""C_SRV"SERVER:"C_SKI" Pentru a misca camera, apasati  tasta "C_ALB"SPACE"C_SKI" iar pentru a misca obiectul, apasa click pe (X,Y,Z).");
        
SCM(playerid0xFFFFFFFF""C_SRV"SERVER:"C_SKI" Iar pentru a anula actiunea apasati tasta "C_ALB"ESC"C_SKI", obiectul o sa fie spawnat (in locul initial).");
        new 
FloatxFloatyFloatz;
        
GetPlayerPos(playeridxyz);
        
GetXYInFrontOfPlayer(playeridxy3.0);
        new 
objectid CreateDynamicObject(HouseFurnitures[listitem][ModelID], xyz0.00.00.0GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        
mysql_format(handlequerysizeof(query), "INSERT INTO housefurnitures SET HouseID=%d, FurnitureID=%d, FurnitureX=%f, FurnitureY=%f, FurnitureZ=%f, FurnitureVW=%d, FurnitureInt=%d"idlistitemxyzGetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid));
        new 
Cacheadd mysql_query(handlequery), data[e_furniture];
        
data[SQLID] = cache_insert_id();
        
data[HouseID] = id;
        
data[ArrayID] = listitem;
        
data[furnitureX] = x;
        
data[furnitureY] = y;
        
data[furnitureZ] = z;
        
data[furnitureRX] = 0.0;
        
data[furnitureRY] = 0.0;
        
data[furnitureRZ] = 0.0;
        
cache_delete(add);
        
Streamer_SetArrayData(STREAMER_TYPE_OBJECTobjectidE_STREAMER_EXTRA_IDdata);
        
        
EditingFurniture[playerid] = true;
        
EditDynamicObject(playeridobjectid);
        return 
1;
    } 
Reply


Messages In This Thread
Dialog list furniture - by HypCosmin - 08.02.2019, 20:20
Re: Dialog list furniture - by TokicMajstor - 08.02.2019, 21:00
Re: Dialog list furniture - by Pottus - 08.02.2019, 21:03

Forum Jump:


Users browsing this thread: 1 Guest(s)