27.09.2013, 01:16
pawn Код:
case THREAD_LOAD_FACVEHS:
{
for(new row = 0; row < szRows; ++row)
{
for(new iFac = 1; iFac < MAX_FACTION; iFac++)
{
cache_get_field_content(0,"model_id", szResult); FactionVehicleInfo[iFac][row][fVI_ModelID] = strval(szResult);
cache_get_field_content(0,"colour_1", szResult); FactionVehicleInfo[iFac][row][fVI_Colours][0] = strval(szResult);
cache_get_field_content(0,"colour_2", szResult); FactionVehicleInfo[iFac][row][fVI_Colours][1] = strval(szResult);
cache_get_field_content(0,"upkeep", szResult); FactionVehicleInfo[iFac][row][fVI_upKeep] = strval(szResult);
cache_get_field_content(0,"rank_needed", szResult); FactionVehicleInfo[iFac][row][fVI_vehRank] = strval(szResult);
cache_get_field_content(0,"posX", szResult); FactionVehicleInfo[iFac][row][fVI_vPos][0] = floatstr(szResult);
cache_get_field_content(0,"posY", szResult); FactionVehicleInfo[iFac][row][fVI_vPos][1] = floatstr(szResult);
cache_get_field_content(0,"posZ", szResult); FactionVehicleInfo[iFac][row][fVI_vPos][2] = floatstr(szResult);
cache_get_field_content(0, "posA", szResult); FactionVehicleInfo[iFac][row][fVI_vPos][3] = floatstr(szResult);
FactionVehicleInfo[iFac][row][fVI_vID] = CreateVehicle(FactionVehicleInfo[iFac][row][fVI_ModelID], FactionVehicleInfo[iFac][row][fVI_vPos][0], FactionVehicleInfo[iFac][row][fVI_vPos][1], FactionVehicleInfo[iFac][row][fVI_vPos][2], FactionVehicleInfo[iFac][row][fVI_vPos][3], FactionVehicleInfo[iFac][row][fVI_Colours][0], FactionVehicleInfo[iFac][row][fVI_Colours][1], -1);
}
printf("%d Rows", szRows);
}
print("[SERVER]: Faction Vehicles have been loaded.");
}
FactionVehicleInfo[MAX_FACTIONS (fac id basically)] [ MAX_FACTION_VEHICLES (veh slot in the max_fac_vehicles)]
Okay, I have 3 vehicles in the database - ONE FBI Rancher, a Sultan and a Bullet and when the vehicles load, it loads THREE FBI Ranchers, instead of the individual models and it also loads all THREE FBI Ranchers into faction slot 0 when the bullet is meant to be in 1 and the sultan is meant to be in 2
Appreciate anyone who trys to help, thank you!
Having this problem for awhile now