14.05.2016, 19:27
Add this to your function so I can see what components id your variable contains.
So it should look like this.
Then show me the output with screenshots or copy them from server log and post here.
pawn Код:
for(new i=0; i<sizeof(VehicleInfo[vehicleid][vMods]); i++) {
printf("componentid: %i",VehicleInfo[vehicleid][vMods][i])
}
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])
}
}