Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new tuned;
- //--------------------------------Load Vehicles---------------------------------
- vehcount = CountVehicles(V_FILE_LOAD);
- LoadVehicles();
- for(new c=1;c<=vehcount;c++)
- {
- ModVehicle(c);
- }
- //==============================================================================
- stock ModVehicle(vehicleid)
- {
- new tuned2 = 0;
- if(VehicleInfo[vehicleid][mod1] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod1]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod2] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod2]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod3] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod3]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod4] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod4]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod5] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod5]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod6] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod6]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod7] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod7]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod8] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod8]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod9] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod9]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod10] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod10]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod11] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod11]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod12] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod12]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod13] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod13]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod14] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod14]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod15] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod15]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod16] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod16]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][mod17] != 0) {
- AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod17]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][color_1] > -1 || VehicleInfo[vehicleid][color_2] > -1) {
- ChangeVehicleColor(vehicleid,VehicleInfo[vehicleid][color_1],VehicleInfo[vehicleid][color_2]);
- tuned2 = 1;
- }
- if(VehicleInfo[vehicleid][paintjob] > -1) {
- ChangeVehiclePaintjob(vehicleid,VehicleInfo[vehicleid][paintjob]);
- tuned2 = 1;
- }
- if(tuned2 == 1) {
- tuned++;
- }
- }
- //=====================================================
- CMD:untune(playerid, params[]) {
- new
- vehicleid = GetPlayerVehicleID(playerid);
- if(vehicleid == 0)
- return SendClientMessage(playerid, 0, "Invalid vehicle ID");
- for(new i = 0; i < 14; i++){
- RemoveVehicleComponent(vehicleid, GetVehicleComponentInSlot(vehicleid, i));
- }
- VehicleInfo[vehicleid][mod1] = 0;
- VehicleInfo[vehicleid][mod2] = 0;
- VehicleInfo[vehicleid][mod3] = 0;
- VehicleInfo[vehicleid][mod4] = 0;
- VehicleInfo[vehicleid][mod5] = 0;
- VehicleInfo[vehicleid][mod6] = 0;
- VehicleInfo[vehicleid][mod7] = 0;
- VehicleInfo[vehicleid][mod8] = 0;
- VehicleInfo[vehicleid][mod9] = 0;
- VehicleInfo[vehicleid][mod10] = 0;
- VehicleInfo[vehicleid][mod11] = 0;
- VehicleInfo[vehicleid][mod12] = 0;
- VehicleInfo[vehicleid][mod13] = 0;
- VehicleInfo[vehicleid][mod14] = 0;
- VehicleInfo[vehicleid][mod15] = 0;
- VehicleInfo[vehicleid][mod16] = 0;
- VehicleInfo[vehicleid][mod17] = 0;
- VehicleInfo[vehicleid][paintjob] = -1;
- VehicleInfo[vehicleid][color_2] = -1;
- VehicleInfo[vehicleid][color_1] = -1;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement