Jump to content
  • 0

Nu mi se afiseaza numele vehiculelor din dealership


Question

Posted

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

5 answers to this question

Recommended Posts

  • 0
Posted
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.