Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:towcar(playerid, params[]) {
- new szTitle[180], szDialog[1300], szDialog2[1300], vstatus[1024];
- if(GetVehicles(playerid) == 0) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu ai un vehicul personal!");
- if(GetPlayerCash(playerid) < 2500) return SCM(playerid, COLOR_GREY, "Ai nevoie de $2,500 pentru a respawna un vehicul personal!");
- format(szTitle, sizeof(szTitle), "Tow Car - Vehicles (%d/%d)", GetVehicles(playerid), TotalSlots(playerid));
- strcat(szDialog2, "Vehicul\tStatus\n");
- for(new i = 0; i < 10; i++) {
- if(i < 5) {
- if(i < 3) {
- if(PlayerInfo[playerid][pCarKey][i] != 0) {
- new car = PlayerInfo[playerid][pCarKey][i];
- if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "%s\t{FFFF00}(occupied)", aVehicleNames[CarInfo[car][cModel]-400]);
- else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "%s\t{26B309}(spawned)", aVehicleNames[CarInfo[car][cModel]-400]);
- else format(vstatus, sizeof(vstatus), "%s\t{FF0000}(despawned)", aVehicleNames[CarInfo[car][cModel]-400]);
- format(szDialog, sizeof(szDialog), "%s\n", vstatus);
- strcat(szDialog2, szDialog);
- }
- }
- else {
- if(PlayerInfo[playerid][pCarKey][i] != 0) {
- new car = PlayerInfo[playerid][pCarKey][i];
- if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "%s\t{FFFF00}(occupied)", aVehicleNames[CarInfo[car][cModel]-400]);
- else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "%s\t{26B309}(spawned)", aVehicleNames[CarInfo[car][cModel]-400]);
- else format(vstatus, sizeof(vstatus), "%s\t{FF0000}(despawned)", aVehicleNames[CarInfo[car][cModel]-400]);
- format(szDialog, sizeof(szDialog), "%s\n", vstatus);
- strcat(szDialog2, szDialog);
- }
- }
- }
- else {
- if(PlayerInfo[playerid][pCarKey][i] != 0) {
- new car = PlayerInfo[playerid][pCarKey][i];
- if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "%s\t{FFFF00}(occupied)", aVehicleNames[CarInfo[car][cModel]-400]);
- else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "%s\t{26B309}(spawned)", aVehicleNames[CarInfo[car][cModel]-400]);
- else format(vstatus, sizeof(vstatus), "%s\t{FF0000}(despawned)", aVehicleNames[CarInfo[car][cModel]-400]);
- format(szDialog, sizeof(szDialog), "%s\n", vstatus);
- strcat(szDialog2, szDialog);
- }
- }
- }
- ShowPlayerDialog(playerid, DIALOG_TOWCAR, DIALOG_STYLE_LIST, szTitle, szDialog2, "Ok", "Exit");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement