Vehicle loading problem!!!
#8

Not sure, I kinda fixed it.

pawn Код:
case THREAD_LOAD_FACVEHS:
        {
            new rows, iFac = 0;
            for(new row = 0; row < szRows; ++row)
            {
                    cache_get_field_content(0, "fac_id", szResult); iFac = strval(szResult);
                    FactionVehicleInfo[iFac][szRows][fVI_facID] = strval(szResult);
                   
                    cache_get_field_content(row,"model_id", szResult); FactionVehicleInfo[iFac][szRows][fVI_ModelID] = strval(szResult);
                    cache_get_field_content(row,"colour_1", szResult); FactionVehicleInfo[iFac][szRows][fVI_Colours][0] = strval(szResult);
                    cache_get_field_content(row,"colour_2", szResult); FactionVehicleInfo[iFac][szRows][fVI_Colours][1] = strval(szResult);
                    cache_get_field_content(row,"upkeep", szResult); FactionVehicleInfo[iFac][szRows][fVI_upKeep] = strval(szResult);
                    cache_get_field_content(row,"rank_needed", szResult); FactionVehicleInfo[iFac][szRows][fVI_vehRank] = strval(szResult);
                    cache_get_field_content(row,"posX", szResult); FactionVehicleInfo[iFac][szRows][fVI_vPos][0] = floatstr(szResult);
                    cache_get_field_content(row,"posY", szResult); FactionVehicleInfo[iFac][szRows][fVI_vPos][1] = floatstr(szResult);
                    cache_get_field_content(row,"posZ", szResult); FactionVehicleInfo[iFac][szRows][fVI_vPos][2] = floatstr(szResult);
                    cache_get_field_content(row, "posA", szResult); FactionVehicleInfo[iFac][szRows][fVI_vPos][3] = floatstr(szResult);

                    FactionVehicleInfo[iFac][szRows][fVI_vID] = CreateVehicle(FactionVehicleInfo[iFac][szRows][fVI_ModelID], FactionVehicleInfo[iFac][szRows][fVI_vPos][0], FactionVehicleInfo[iFac][szRows][fVI_vPos][1], FactionVehicleInfo[iFac][szRows][fVI_vPos][2], FactionVehicleInfo[iFac][szRows][fVI_vPos][3], FactionVehicleInfo[iFac][szRows][fVI_Colours][0], FactionVehicleInfo[iFac][szRows][fVI_Colours][1], -1);

                    printf("Vehicle ID %d - Vehicle Slot %d - Faction ID: %d - Model ID: %d", FactionVehicleInfo[iFac][szRows][fVI_vID], szRows, FactionVehicleInfo[iFac][szRows][fVI_facID], FactionVehicleInfo[iFac][szRows][fVI_ModelID]);
               
                    iFac++;
                    szRows++;
            }
        }
It spawns all the vehicles, although all the vehicles go into faction ID 1 when some are supposed to be into 2 or 3.
Reply


Messages In This Thread
Vehicle loading problem!!! - by MattSlater - 22.09.2013, 02:53
Re: Vehicle loading problem!!! - by MattSlater - 22.09.2013, 12:03
Re: Vehicle loading problem!!! - by EiresJason - 22.09.2013, 12:50
Re: Vehicle loading problem!!! - by MattSlater - 22.09.2013, 13:46
Re: Vehicle loading problem!!! - by EiresJason - 22.09.2013, 14:50
Re: Vehicle loading problem!!! - by MattSlater - 22.09.2013, 15:08
Re: Vehicle loading problem!!! - by EiresJason - 22.09.2013, 15:43
Re: Vehicle loading problem!!! - by MattSlater - 22.09.2013, 20:32
Re: Vehicle loading problem!!! - by MattSlater - 23.09.2013, 10:14
Re: Vehicle loading problem!!! - by JaKe Elite - 23.09.2013, 10:18

Forum Jump:


Users browsing this thread: 1 Guest(s)