Jump to content

[DELETED]Problemă afişare


Rrrrrrrr
 Share

Recommended Posts

Salut, am incercat să afişez in comanda /v dacă vehiculul X este unul de tip VIP, dar dacă nu dau restart la server nu se va afişa.

Video: LINK

stock ShowPlayerVehicle(playerid) {
    new szTitle[180], szDialog[1300], szDialog2[1300], vstatus[1024];
    LoadPlayerCars(playerid);
    if(GetVehicles(playerid) == 0) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu ai un vehicul personal!");
    format(szTitle, sizeof(szTitle), "Vehicles (%d/%d)", GetVehicles(playerid), TotalSlots(playerid));
    strcat(szDialog2, "Model\t\tStatus\t\tKM\t\tVIP\n");        
    for(new i = 0; i < 20; i++) {
        new car =  PlayerInfo[playerid][pCarKey][i];
        if(car != 0) {
            if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "%s\t\t{FFFF00}(Occupied){FFFFFF}\t\t%.2f\t%d", aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][KM], CarInfo[car][cVIPcar]);
            else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "%s\t\t{26B309}(Spawned){FFFFFF}\t\t%.2f\t%d", aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][KM], CarInfo[car][cVIPcar]);
            else format(vstatus, sizeof(vstatus), "%s\t\t{FF0000}(Despawned){FFFFFF}\t\t%.2f\t%d", aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][KM], CarInfo[car][cVIPcar]);
            format(szDialog, sizeof(szDialog), "%s\n", vstatus);
            strcat(szDialog2, szDialog);
        }
        else strcat(szDialog2, "{FFD857}<slot liber>\n"), sVehicle[i][playerid] = 0;
    }
    ShowPlayerDialog(playerid, DIALOG_GARAGE, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog2, "Ok", "Exit");
    return 1;
}

 

Edited by Serieux
Link to comment
Share on other sites

Topic-ul a fost șters deoarece nu ai respectat modelul de postare. Te rugăm sa revii cu alt topic in care să respecți modelul.

Topic șters!

Respecta si vei fi respectat.

 

BigInt Pawn:

Pacman C++: 

Snake C++:

Minesweeper C++:

 

mattbb.cash

leaks.ro

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...