Jump to content
  • 0

Nu mi se afiseaza numele vehiculelor din dealership


Matei02Mihai

Question

Salut. Am vrut sa creez o comanda cu ajutorul careia sa editez vehiculele din delaership, dar nu mi se afiseaza numele. 

Va las aici comanda:

Quote
CMD:dsvehedit(playerid, params[]){
    if(PlayerInfo[playerid][pAdmin] <= 6) return CM(playerid, -1, NU_ESTI_ADMIN);
    else{
        new vehiclename[30];
        AddDialogListitem(playerid, "Name\tPrice\tMax Speed\tStock");
        new handle = SQL::Open(SQL::MTREAD, "dealership");
        SQL::ReadRetrievedRows(handle, i){
            SQL::ReadString(handle, "dsName", DealershipInfo[playerid][dsName], i);
            SQL::ReadInt(handle, "dsPrice", DealershipInfo[playerid][dsPrice], i);
            SQL::ReadInt(handle, "dsMaxSpeed", DealershipInfo[playerid][dsMaxSpeed], i);
            SQL::ReadInt(handle, "dsStock", DealershipInfo[playerid][dsStock], i);
            new listitems[256];
            if(DealershipInfo[playerid][dsStock] <= 10){
                format(listitems, sizeof(listitems), "%s\t{009C40}%i{FFFFFF}\t%i\t{C30000}%i{FFFFFF}", DealershipInfo[playerid][dsName][i], DealershipInfo[playerid][dsPrice], DealershipInfo[playerid][dsMaxSpeed], DealershipInfo[playerid][dsStock]);
                AddDialogListitem(playerid, listitems);
            } else {
                format(listitems, sizeof(listitems), "%s\t{009C40}%i{FFFFFF}\t%i\t{3EDA00}%i{FFFFFF}", DealershipInfo[playerid][dsName][i], DealershipInfo[playerid][dsPrice], DealershipInfo[playerid][dsMaxSpeed], DealershipInfo[playerid][dsStock]);
                AddDialogListitem(playerid, listitems);
            }
        }
        ShowPlayerDialogPages(playerid, "dsVehicle", DIALOG_STYLE_TABLIST_HEADERS, "Modify dealership vehicle", "Select", "Cancel", 15, "{FF0000}>>>", "{FF0000}<<<");
    }
    return 1;
}

Si mai jos aveti o poza cu felul in care mi se afiseaza in joc:

image.png.789069c1c6075211e31eebb135d2d6b9.png

Am folosit include-ul urmator: https://github.com/Nickk888SAMP/Dialog-Pages

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0
On 9/8/2022 at 8:05 PM, Matei02Mihai said:

ma poti ajuta cu problema mea?

Ti-a trimis @HPQ123 link, și îți explica acolo cum se face. 

                     

  Serverul meu de Discord: Click aici       a7DfKP7.gif                                                                      FGIfknL.gif

k35T5Nb.png                                                                                                                                                                                                                                                                                                I0aS856.gif

Link to comment
Share on other sites

  • 0
On 9/8/2022 at 7:38 PM, HPQ123 said:

Prea complicat include ul, folosește https://github.com/HPQ123-Oficill/easyDialog ai și pagini aici 

easydialog in not good include, because it use too much memory (data segment). I recommend tdw_dialog. It's written in parser-constructs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.