Problem with function under OnGameModeInit
#1

So, i have a couple of functions under ongamemodeinit. They should load data from MySQL. Everyone works excpet one. When i put it last, it loads only 10 faction vehicles and when i put it first, then it load too only 10 faction vehicles & the following functions doest work, it says Gamemode is loaded. I apperciate, when somebody can solve this. MySQL debug file is also fine, there arent any errors.

OnGameModeInit
pawn Код:
LoadGrupeeringumasinad();
LoadCars();
LoadBusinesses();
LoadHouses();
LoadTexts();
LoadFactions();
LoadP66sad();
Function LoadGrupeeringumasinad
pawn Код:
stock LoadGrupeeringumasinad()
{
new query[600], savingstring[24];
for(new i = 1; i <  MAX_VEHICLES; i++)
    {
format(query, sizeof(query), "SELECT * FROM grupeeringusхidukid WHERE MysqlID = %i", i);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query, "|"))
{
mysql_fetch_field_row(savingstring, "GVEH1");fInfo[i][Model] = strval(savingstring);
mysql_fetch_field_row(savingstring, "GVEHcolor1");fInfo[i][AutoV2rv1] = strval(savingstring);
mysql_fetch_field_row(savingstring, "GVEHcolor2");fInfo[i][AutoV2rv2] = strval(savingstring);
mysql_fetch_field_row(savingstring, "ID");fInfo[i][faID] = strval(savingstring);
mysql_fetch_field_row(savingstring, "kvX");fInfo[i][kvX] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "kvY");fInfo[i][kvY] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "kvZ");fInfo[i][kvZ] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "kvA");fInfo[i][kvA] = floatstr(savingstring);
fvehicles_created++;
}
mysql_free_result();
fInfo[i][Auto] = CreateVehicle(fInfo[i][Model],fInfo[i][kvX],fInfo[i][kvY],fInfo[i][kvZ],fInfo[i][kvA],fInfo[i][AutoV2rv1],fInfo[i][AutoV2rv2],-1);


}
printf("Kokku laeti %d grupeeringu sхidukit; ",fvehicles_created);
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)