} if(TuneCar[vehicleid][mod13]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod13]); } if(TuneCar[vehicleid][mod14]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod14]); } if(TuneCar[vehicleid][mod15]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod15]); } if(TuneCar[vehicleid][mod16]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod16]); } if(TuneCar[vehicleid][mod17]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod17]); } if(TuneCar[vehicleid][colorA]!=0 || TuneCar[vehicleid][colorB]!=0) { ChangeVehicleColor(vehicleid,TuneCar[vehicleid][colorA],TuneCar[vehicleid][colorB]); } if(TuneCar[vehicleid][paintjob]!=0) { ChangeVehiclePaintjob(vehicleid,TuneCar[vehicleid][paintjob]); } return 1;}InitComponents(componentid){ new i; for(i=0; i<20; i++) { if(spoiler[i][0]==componentid) { return 1; } } for(i=0; i<3; i++) { if(nitro[i][0]==componentid) { return 2; } } for(i=0; i<23; i++) { if(fbumper[i][0]==componentid) { return 3; } } for(i=0; i<22; i++) { if(rbumper[i][0]==componentid) { return 4; } } for(i=0; i<28; i++) { if(exhaust[i][0]==componentid) { return 5; } } for(i=0; i<2; i++) { if(bventr[i][0]==componentid) { return 6; } } for(i=0; i<2; i++) { if(bventl[i][0]==componentid) { return 7; } } for(i=0; i<4; i++) { if(bscoop[i][0]==componentid) { return 8; } } for(i=0; i<13; i++) { if(rscoop[i][0]==componentid) { return 9; } } for(i=0; i<21; i++) { if(lskirt[i][0]==componentid) { return 10; } } for(i=0; i<21; i++) { if(rskirt[i][0]==componentid) { return 11; } } if(hydraulics[0][0]==componentid) { return 12; } if(base[0][0]==componentid) { return 13; } for(i=0; i<2; i++) { if(rbbars[i][0]==componentid) { return 14; } } for(i=0; i<2; i++) { if(fbbars[i][0]==componentid) { return 15; } } for(i=0; i<17; i++) { if(wheels[i][0]==componentid) { return 16; } } for(i=0; i<2; i++) { if(lights[i][0]==componentid) { return 17; } } return 0;}public OnVehicleMod(playerid,vehicleid,componentid){ new Varz=InitComponents(componentid); switch (Varz) { case 1: { TuneCar[vehicleid][mod1]=componentid; } case 2: { TuneCar[vehicleid][mod2]=componentid; } case 3: { TuneCar[vehicleid][mod3]=componentid; } case 4: { TuneCar[vehicleid][mod4]=componentid; } case 5: { TuneCar[vehicleid][mod5]=componentid; } case 6: { TuneCar[vehicleid][mod6]=componentid; } case 7: { TuneCar[vehicleid][mod7]=componentid; } case 8: { TuneCar[vehicleid][mod8]=componentid; } case 9: { TuneCar[vehicleid][mod9]=componentid; } case 10: { TuneCar[vehicleid][mod10]=componentid; } case 11: { TuneCar[vehicleid][mod11]=componentid; } case 12: { TuneCar[vehicleid][mod12]=componentid; } case 13: { TuneCar[vehicleid][mod13]=componentid; } case 14: { TuneCar[vehicleid][mod14]=componentid; } case 15: { TuneCar[vehicleid][mod15]=componentid; } case 16: { TuneCar[vehicleid][mod16]=componentid; } case 17: { TuneCar[vehicleid][mod17]=componentid; } } printf("Componente adicionado: %d",componentid); SaveModsForAll(vehicleid); return 1;}public OnVehiclePaintjob(playerid,vehicleid, paintjobid){ TuneCar[vehicleid][paintjob]=paintjobid; return 1;}public LoadModsForAll(vehicleid){ new formatLD[256]; format(formatLD,sizeof(formatLD),"voituresmods/%d.mods",vehicleid); if(dini_Exists(formatLD)) { TuneCar[vehicleid][mod1] = dini_Int(formatLD, "mod1"); TuneCar[vehicleid][mod2] = dini_Int(formatLD, "mod2"); TuneCar[vehicleid][mod3] = dini_Int(formatLD, "mod3"); TuneCar[vehicleid][mod4] = dini_Int(formatLD, "mod4"); TuneCar[vehicleid][mod5] = dini_Int(formatLD, "mod5"); TuneCar[vehicleid][mod6] = dini_Int(formatLD, "mod6"); TuneCar[vehicleid][mod7] = dini_Int(formatLD, "mod7"); TuneCar[vehicleid][mod8] = dini_Int(formatLD, "mod8"); TuneCar[vehicleid][mod9] = dini_Int(formatLD, "mod9"); TuneCar[vehicleid][mod10] = dini_Int(formatLD, "mod10"); TuneCar[vehicleid][mod11] = dini_Int(formatLD, "mod11"); TuneCar[vehicleid][mod12] = dini_Int(formatLD, "mod12"); TuneCar[vehicleid][mod13] = dini_Int(formatLD, "mod13"); TuneCar[vehicleid][mod14] = dini_Int(formatLD, "mod14"); TuneCar[vehicleid][mod15] = dini_Int(formatLD, "mod15"); TuneCar[vehicleid][mod16] = dini_Int(formatLD, "mod16"); TuneCar[vehicleid][mod17] = dini_Int(formatLD, "mod17"); TuneCar[vehicleid][paintjob] = dini_Int(formatLD, "paintjob"); TuneCar[vehicleid][colorA] = dini_Int(formatLD, "color1"); TuneCar[vehicleid][colorB] = dini_Int(formatLD, "color2"); } else { dini_Create(formatLD); } return 0;}public SaveModsForAll(vehicleid){ new formatLD[256]; format(formatLD,sizeof(formatLD),"voituresmods/%d.mods",vehicleid); if(dini_Exists(formatLD)) { dini_IntSet(formatLD,"mod1",TuneCar[vehicleid][mod1]); dini_IntSet(formatLD,"mod2",TuneCar[vehicleid][mod2]); dini_IntSet(formatLD,"mod3",TuneCar[vehicleid][mod3]); dini_IntSet(formatLD,"mod4",TuneCar[vehicleid][mod4]); dini_IntSet(formatLD,"mod5",TuneCar[vehicleid][mod5]); dini_IntSet(formatLD,"mod6",TuneCar[vehicleid][mod6]); dini_IntSet(formatLD,"mod7",TuneCar[vehicleid][mod8]); dini_IntSet(formatLD,"mod9",TuneCar[vehicleid][mod9]); dini_IntSet(formatLD,"mod10",TuneCar[vehicleid][mod10]); dini_IntSet(formatLD,"mod11",TuneCar[vehicleid][mod11]); dini_IntSet(formatLD,"mod12",TuneCar[vehicleid][mod12]); dini_IntSet(formatLD,"mod13",TuneCar[vehicleid][mod13]); dini_IntSet(formatLD,"mod14",TuneCar[vehicleid][mod14]); dini_IntSet(formatLD,"mod15",TuneCar[vehicleid][mod15]); dini_IntSet(formatLD,"mod16",TuneCar[vehicleid][mod16]); dini_IntSet(formatLD,"mod17",TuneCar[vehicleid][mod17]); dini_IntSet(formatLD,"paintjob",TuneCar[vehicleid][paintjob]); dini_IntSet(formatLD,"color1",TuneCar[vehicleid][colorA]); dini_IntSet(formatLD,"color2",TuneCar[vehicleid][colorB]); } else { dini_Create(formatLD); dini_IntSet(formatLD,"mod1",TuneCar[vehicleid][mod1]); dini_IntSet(formatLD,"mod2",TuneCar[vehicleid][mod2]); dini_IntSet(formatLD,"mod3",TuneCar[vehicleid][mod3]); dini_IntSet(formatLD,"mod4",TuneCar[vehicleid][mod4]); dini_IntSet(formatLD,"mod5",TuneCar[vehicleid][mod5]); dini_IntSet(formatLD,"mod6",TuneCar[vehicleid][mod6]); dini_IntSet(formatLD,"mod7",TuneCar[vehicleid][mod8]); dini_IntSet(formatLD,"mod9",TuneCar[vehicleid][mod9]); dini_IntSet(formatLD,"mod10",TuneCar[vehicleid][mod10]); dini_IntSet(formatLD,"mod11",TuneCar[vehicleid][mod11]); dini_IntSet(formatLD,"mod12",TuneCar[vehicleid][mod12]); dini_IntSet(formatLD,"mod13",TuneCar[vehicleid][mod13]); dini_IntSet(formatLD,"mod14",TuneCar[vehicleid][mod14]); dini_IntSet(formatLD,"mod15",TuneCar[vehicleid][mod15]); dini_IntSet(formatLD,"mod16",TuneCar[vehicleid][mod16]); dini_IntSet(formatLD,"mod17",TuneCar[vehicleid][mod17]); dini_IntSet(formatLD,"paintjob",TuneCar[vehicleid][paintjob]); dini_IntSet(formatLD,"color1",TuneCar[vehicleid][colorA]); dini_IntSet(formatLD,"color2",TuneCar[vehicleid][colorB]); } return 0;}public OnVehicleRespray(playerid,vehicleid, color1, color2){ TuneCar[vehicleid][colorA] = color1; TuneCar[vehicleid][colorB] = color2; return 1;}public VehicleSpawn(vehicleid){ TuneThisCar(vehicleid); LoadModsForAll(vehicleid); return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]){ new car; car = GetPlayerVehicleID(playerid); if(dialogid == DIALOGID) // Menu { if(response) { if(listitem == 0) // Rodas { ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "Rodas", "Estilo 1 \nEstilo 2 \nEstilo 3 \nEstilo 4 \nEstilo 5 \nEstilo 6 \nVoltar", "Ok", "Cancelar"); } if(listitem == 1) // Cores { ShowPlayerDialog(playerid, DIALOGID+2,