Saving car mods using yini
#6

Add this to your function so I can see what components id your variable contains.

pawn Код:
for(new i=0; i<sizeof(VehicleInfo[vehicleid][vMods]); i++) {
        printf("componentid: %i",VehicleInfo[vehicleid][vMods][i])
    }
So it should look like this.

pawn Код:
stock SaveVehMods(vehicleid, componentid)
{
    for(new s=0; s<20; s++) {
        if(componentid == spoiler[s][0]) {
            VehicleInfo[vehicleid][vMods][0] = componentid;
        }
    }
    for(new s=0; s<4; s++) {
         if(componentid == bscoop[s][0]) {
               VehicleInfo[vehicleid][vMods][1] = componentid;
        }
    }
    for(new s=0; s<17; s++) {
         if(componentid == rscoop[s][0]) {
               VehicleInfo[vehicleid][vMods][2] = componentid;
        }
    }
    for(new s=0; s<21; s++) {
         if(componentid == rskirt[s][0]) {
               VehicleInfo[vehicleid][vMods][3] = componentid;
        }
    }
    for(new s=0; s<21; s++) {
         if(componentid == lskirt[s][0]) {
               VehicleInfo[vehicleid][vMods][16] = componentid;
        }
    }
    for(new s=0; s<2; s++) {
         if(componentid == light[s][0]) {
               VehicleInfo[vehicleid][vMods][4] = componentid;
        }
    }
    for(new s=0; s<3; s++) {
         if(componentid == nitro[s][0]) {
               VehicleInfo[vehicleid][vMods][5] = componentid;
        }
    }
    for(new s=0; s<28; s++) {
         if(componentid == exhaust[s][0]) {
               VehicleInfo[vehicleid][vMods][6] = componentid;
        }
    }
    for(new s=0; s<17; s++) {
         if(componentid == wheels[s][0]) {
               VehicleInfo[vehicleid][vMods][7] = componentid;
        }
    }
    for(new s=0; s<1; s++) {
         if(componentid == bas[s][0]) {
               VehicleInfo[vehicleid][vMods][8] = componentid;
        }
    }
    for(new s=0; s<1; s++) {
         if(componentid == hydraulics[s][0]) {
               VehicleInfo[vehicleid][vMods][9] = componentid;
        }
    }
    for(new s=0; s<23; s++) {
         if(componentid == fbumper[s][0]) {
               VehicleInfo[vehicleid][vMods][10] = componentid;
        }
    }
    for(new s=0; s<22; s++) {
         if(componentid == rbumper[s][0]) {
               VehicleInfo[vehicleid][vMods][11] = componentid;
        }
    }
    for(new s=0; s<2; s++) {
         if(componentid == bventr[s][0]) {
               VehicleInfo[vehicleid][vMods][12] = componentid;
        }
    }
    for(new s=0; s<2; s++) {
         if(componentid == bventl[s][0]) {
               VehicleInfo[vehicleid][vMods][13] = componentid;
        }
    }
    for(new s=0; s<2; s++) {
         if(componentid == fbbars[s][0]) {
               VehicleInfo[vehicleid][vMods][15] = componentid;
        }
    }
    for(new s=0; s<4; s++) {
         if(componentid == rbbars[s][0]) {
               VehicleInfo[vehicleid][vMods][14] = componentid;
        }
    }

    for(new i=0; i<sizeof(VehicleInfo[vehicleid][vMods]); i++) {
        printf("componentid: %i",VehicleInfo[vehicleid][vMods][i])
    }
}
Then show me the output with screenshots or copy them from server log and post here.
Reply


Messages In This Thread
Saving car mods using yini - by SalmaN97 - 14.05.2016, 14:43
Re: Saving car mods using yini - by Skimmer - 14.05.2016, 17:07
Re: Saving car mods using yini - by SalmaN97 - 14.05.2016, 17:18
Re: Saving car mods using yini - by Skimmer - 14.05.2016, 17:28
Re: Saving car mods using yini - by SalmaN97 - 14.05.2016, 18:13
Re: Saving car mods using yini - by Skimmer - 14.05.2016, 19:27
Re: Saving car mods using yini - by SalmaN97 - 14.05.2016, 19:58
Re: Saving car mods using yini - by oMa37 - 14.05.2016, 20:34
Re: Saving car mods using yini - by SalmaN97 - 14.05.2016, 20:39
Re: Saving car mods using yini - by Sew_Sumi - 14.05.2016, 20:52

Forum Jump:


Users browsing this thread: 1 Guest(s)