Advertisement
Marlborox

Untitled

Jun 7th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.82 KB | None | 0 0
  1. CMD:v(playerid, params[])
  2. {
  3. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
  4. if(BlockVehUse[playerid] != 0) return SS(playerid, COLOR_RED2, "Ai prea multe masini, foloseste /sellcar si vinde una.", "You have to many vehicles, use /sellcar and sell one.");
  5. new masina1[256],masina[1000],count;
  6. for(new id; id < PlayerInfo[playerid][pCarSlots]; id++)
  7. {
  8. if(PlayerInfo[playerid][pCar][id] != -1)
  9. {
  10. if(PlayerInfo[playerid][pCarID][id] != 0)
  11. {
  12. format(masina1, sizeof(masina1), "{0C370A}(spawned) {FFFFFF}%s\n",aVehicleNames[PlayerInfo[playerid][pCarModel][id] - 400]);
  13. strcat(masina, masina1);
  14. }
  15. else
  16. {
  17. format(masina1, sizeof(masina1), "{FB0404}(despawned) {FFFFFF}%s\n",aVehicleNames[PlayerInfo[playerid][pCarModel][id] - 400]);
  18. strcat(masina, masina1);
  19. }
  20. count++;
  21. }
  22. else
  23. {
  24. format(masina1, sizeof(masina1), "{F3FF73}[ empty ]\n");
  25. strcat(masina, masina1);
  26. }
  27. }
  28. if(count != 0)
  29. {
  30. if(PlayerInfo[playerid][pCarSlots] < 10)
  31. {
  32. format(masina1, sizeof(masina1), "{E99B5F}[+] Add vehicle slot - 20 premium points\n");
  33. strcat(masina, masina1);
  34. }
  35. }
  36. else return SendClientMessage(playerid, COLOR_WHITE, "You don't own any cars.");
  37. ShowPlayerDialog(playerid,DIALOG_VEHSPAWN,DIALOG_STYLE_LIST,"Manage your vehicles",masina,"Select","Exit");
  38. return 1;
  39. }
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. CMD:checkv(playerid, params[])
  50. {
  51. if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
  52. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_LIGHTGREEN3, AdminOnly);
  53. new id,string[256],count;
  54. if(sscanf(params, "u",id)) return SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /checkv [name/playerid]");
  55. if(IsPlayerConnected(id))
  56. {
  57. for(new v; v < MAX_PERSONAL_VEHICLES; v++)
  58. {
  59. if(PlayerInfo[id][pCarID][v] != 0)
  60. {
  61. format(string,sizeof(string),"[ID:%d] %s | age: %d | km: %.0f | colors: %d, %d",PlayerInfo[id][pCarID][v],aVehicleNames[PlayerInfo[id][pCarModel][v] - 400],GetDaysFromTimestamp(PlayerInfo[id][pCarBuyTime][v]),PlayerInfo[id][pCarKM][v],PlayerInfo[id][pCarColor1][v],PlayerInfo[id][pCarColor2][v]);
  62. SendClientMessage(playerid, COLOR_LIGHTGREEN3, string);
  63. count++;
  64. }
  65. }
  66. if(count == 0) return SendClientMessage(playerid, COLOR_WHITE, "This player don't have a vehicle spawned.");
  67. }
  68. return 1;
  69. }
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85. if(dialogid == DIALOG_VEHSPAWN)
  86. {
  87. if(response)
  88. {
  89. if(listitem < PlayerInfo[playerid][pCarSlots])
  90. {
  91. if(PlayerInfo[playerid][pCar][listitem] != -1)
  92. {
  93. new titlestring[128],s=listitem;
  94. format(titlestring,sizeof(titlestring),"Manage your %s (%d)",aVehicleNames[PlayerInfo[playerid][pCarModel][s] - 400],PlayerInfo[playerid][pCar][s]);
  95. SelectedCar[playerid] = s;
  96. ShowPlayerDialog(playerid,DIALOG_VEHSPAWNCAR,DIALOG_STYLE_LIST,titlestring,"{FFFFFF}Vehicle Info\nTow Vehicle (/park)\nTow Vehicle (last known location)\nFind Vehicle\nBuy Insurance\nClear Age and KM - {FFFF00}20 premium points\nUpgrade to VIP vehicle - {FFFF00}100 premium points\nUnstuck Vehicle","Select","Close");
  97. }
  98. }
  99. else
  100. {
  101. if(PlayerInfo[playerid][pCarSlots] <= 9)
  102. {
  103. if(PlayerInfo[playerid][pPremiumPoints] <= 19) return SS(playerid, COLOR_LIGHTGREEN3, "Nu ai suficiente puncte premium.", "You don't have enough premium points.");
  104. if(PlayerInfo[playerid][pLanguage] == 2) ShowPlayerDialog(playerid, DIALOG_BUYSLOT, DIALOG_STYLE_MSGBOX, "Esti sigur?", "Esti sigur ca vrei sa platesti 20 puncte premium pentru a-ti cumpara un slot de vehicule?","Da","Nu");
  105. else ShowPlayerDialog(playerid, DIALOG_BUYSLOT, DIALOG_STYLE_MSGBOX, "Vehicle slot", "Do you want to pay 20 premium points to buy a vehicle slot?","Yes","No");
  106. }
  107. }
  108. }
  109. return 1;
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement