Advertisement
Guest User

Untitled

a guest
May 24th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. CMD:towcar(playerid, params[]) {
  2. new szTitle[180], szDialog[1300], szDialog2[1300], vstatus[1024];
  3. if(GetVehicles(playerid) == 0) return SendClientMessage(playerid, COLOR_LGREEN, "Eroare: Nu ai un vehicul personal!");
  4. if(GetPlayerCash(playerid) < 2500) return SCM(playerid, COLOR_GREY, "Ai nevoie de $2,500 pentru a respawna un vehicul personal!");
  5. format(szTitle, sizeof(szTitle), "Tow Car - Vehicles (%d/%d)", GetVehicles(playerid), TotalSlots(playerid));
  6. strcat(szDialog2, "Vehicul\tStatus\n");
  7. for(new i = 0; i < 10; i++) {
  8. if(i < 5) {
  9. if(i < 3) {
  10. if(PlayerInfo[playerid][pCarKey][i] != 0) {
  11. new car = PlayerInfo[playerid][pCarKey][i];
  12. if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "%s\t{FFFF00}(occupied)", aVehicleNames[CarInfo[car][cModel]-400]);
  13. else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "%s\t{26B309}(spawned)", aVehicleNames[CarInfo[car][cModel]-400]);
  14. else format(vstatus, sizeof(vstatus), "%s\t{FF0000}(despawned)", aVehicleNames[CarInfo[car][cModel]-400]);
  15. format(szDialog, sizeof(szDialog), "%s\n", vstatus);
  16. strcat(szDialog2, szDialog);
  17. }
  18. }
  19. else {
  20. if(PlayerInfo[playerid][pCarKey][i] != 0) {
  21. new car = PlayerInfo[playerid][pCarKey][i];
  22. if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "%s\t{FFFF00}(occupied)", aVehicleNames[CarInfo[car][cModel]-400]);
  23. else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "%s\t{26B309}(spawned)", aVehicleNames[CarInfo[car][cModel]-400]);
  24. else format(vstatus, sizeof(vstatus), "%s\t{FF0000}(despawned)", aVehicleNames[CarInfo[car][cModel]-400]);
  25. format(szDialog, sizeof(szDialog), "%s\n", vstatus);
  26. strcat(szDialog2, szDialog);
  27. }
  28. }
  29. }
  30. else {
  31. if(PlayerInfo[playerid][pCarKey][i] != 0) {
  32. new car = PlayerInfo[playerid][pCarKey][i];
  33. if(IsVehicleOccupied(CarInfo[car][Spawned])) format(vstatus, sizeof(vstatus), "%s\t{FFFF00}(occupied)", aVehicleNames[CarInfo[car][cModel]-400]);
  34. else if(CarInfo[car][Spawned] > 0) format(vstatus, sizeof(vstatus), "%s\t{26B309}(spawned)", aVehicleNames[CarInfo[car][cModel]-400]);
  35. else format(vstatus, sizeof(vstatus), "%s\t{FF0000}(despawned)", aVehicleNames[CarInfo[car][cModel]-400]);
  36. format(szDialog, sizeof(szDialog), "%s\n", vstatus);
  37. strcat(szDialog2, szDialog);
  38. }
  39. }
  40. }
  41. ShowPlayerDialog(playerid, DIALOG_TOWCAR, DIALOG_STYLE_LIST, szTitle, szDialog2, "Ok", "Exit");
  42. return 1;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement