Advertisement
DovFLaminggo

Untitled

Jul 27th, 2014
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 KB | None | 0 0
  1. new tuned;
  2.  
  3. //--------------------------------Load Vehicles---------------------------------
  4. vehcount = CountVehicles(V_FILE_LOAD);
  5. LoadVehicles();
  6. for(new c=1;c<=vehcount;c++)
  7. {
  8. ModVehicle(c);
  9. }
  10. //==============================================================================
  11. stock ModVehicle(vehicleid)
  12. {
  13. new tuned2 = 0;
  14. if(VehicleInfo[vehicleid][mod1] != 0) {
  15. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod1]);
  16. tuned2 = 1;
  17. }
  18. if(VehicleInfo[vehicleid][mod2] != 0) {
  19. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod2]);
  20. tuned2 = 1;
  21. }
  22. if(VehicleInfo[vehicleid][mod3] != 0) {
  23. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod3]);
  24. tuned2 = 1;
  25. }
  26. if(VehicleInfo[vehicleid][mod4] != 0) {
  27. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod4]);
  28. tuned2 = 1;
  29. }
  30. if(VehicleInfo[vehicleid][mod5] != 0) {
  31. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod5]);
  32. tuned2 = 1;
  33. }
  34. if(VehicleInfo[vehicleid][mod6] != 0) {
  35. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod6]);
  36. tuned2 = 1;
  37. }
  38. if(VehicleInfo[vehicleid][mod7] != 0) {
  39. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod7]);
  40. tuned2 = 1;
  41. }
  42. if(VehicleInfo[vehicleid][mod8] != 0) {
  43. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod8]);
  44. tuned2 = 1;
  45. }
  46. if(VehicleInfo[vehicleid][mod9] != 0) {
  47. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod9]);
  48. tuned2 = 1;
  49. }
  50. if(VehicleInfo[vehicleid][mod10] != 0) {
  51. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod10]);
  52. tuned2 = 1;
  53. }
  54. if(VehicleInfo[vehicleid][mod11] != 0) {
  55. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod11]);
  56. tuned2 = 1;
  57. }
  58. if(VehicleInfo[vehicleid][mod12] != 0) {
  59. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod12]);
  60. tuned2 = 1;
  61. }
  62. if(VehicleInfo[vehicleid][mod13] != 0) {
  63. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod13]);
  64. tuned2 = 1;
  65. }
  66. if(VehicleInfo[vehicleid][mod14] != 0) {
  67. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod14]);
  68. tuned2 = 1;
  69. }
  70. if(VehicleInfo[vehicleid][mod15] != 0) {
  71. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod15]);
  72. tuned2 = 1;
  73. }
  74. if(VehicleInfo[vehicleid][mod16] != 0) {
  75. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod16]);
  76. tuned2 = 1;
  77. }
  78. if(VehicleInfo[vehicleid][mod17] != 0) {
  79. AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod17]);
  80. tuned2 = 1;
  81. }
  82. if(VehicleInfo[vehicleid][color_1] > -1 || VehicleInfo[vehicleid][color_2] > -1) {
  83. ChangeVehicleColor(vehicleid,VehicleInfo[vehicleid][color_1],VehicleInfo[vehicleid][color_2]);
  84. tuned2 = 1;
  85. }
  86. if(VehicleInfo[vehicleid][paintjob] > -1) {
  87. ChangeVehiclePaintjob(vehicleid,VehicleInfo[vehicleid][paintjob]);
  88. tuned2 = 1;
  89. }
  90. if(tuned2 == 1) {
  91. tuned++;
  92. }
  93. }
  94. //=====================================================
  95. CMD:untune(playerid, params[]) {
  96. new
  97. vehicleid = GetPlayerVehicleID(playerid);
  98.  
  99. if(vehicleid == 0)
  100. return SendClientMessage(playerid, 0, "Invalid vehicle ID");
  101.  
  102. for(new i = 0; i < 14; i++){
  103. RemoveVehicleComponent(vehicleid, GetVehicleComponentInSlot(vehicleid, i));
  104. }
  105.  
  106. VehicleInfo[vehicleid][mod1] = 0;
  107. VehicleInfo[vehicleid][mod2] = 0;
  108. VehicleInfo[vehicleid][mod3] = 0;
  109. VehicleInfo[vehicleid][mod4] = 0;
  110. VehicleInfo[vehicleid][mod5] = 0;
  111. VehicleInfo[vehicleid][mod6] = 0;
  112. VehicleInfo[vehicleid][mod7] = 0;
  113. VehicleInfo[vehicleid][mod8] = 0;
  114. VehicleInfo[vehicleid][mod9] = 0;
  115. VehicleInfo[vehicleid][mod10] = 0;
  116. VehicleInfo[vehicleid][mod11] = 0;
  117. VehicleInfo[vehicleid][mod12] = 0;
  118. VehicleInfo[vehicleid][mod13] = 0;
  119. VehicleInfo[vehicleid][mod14] = 0;
  120. VehicleInfo[vehicleid][mod15] = 0;
  121. VehicleInfo[vehicleid][mod16] = 0;
  122. VehicleInfo[vehicleid][mod17] = 0;
  123. VehicleInfo[vehicleid][paintjob] = -1;
  124. VehicleInfo[vehicleid][color_2] = -1;
  125. VehicleInfo[vehicleid][color_1] = -1;
  126. return 1;
  127. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement