Vehicles doesn't load
#1

Код:
stock LoadPVehicle()
{
    mysql_format(Mysql_users, query, sizeof(query), "SELECT * FROM `privateveh` WHERE `vID` < 200 ORDER BY vID");
    mysql_tquery(Mysql_users, query, "LoadPVehicles", "i", vID);
}

 
stock LoadPVehicles()
{
        new
            vID;

        new szRows, szFields;
        cache_get_data(szRows, szFields, Mysql_users);
        if(szRows)
        {
            for(new i; i < szRows; i++)
            {
                vInfo[vID][vModel] = cache_get_field_content_int(i, "vModel", Mysql_users);
                vInfo[vID][vColor1] = cache_get_field_content_int(i, "vColor1", Mysql_users);
                vInfo[vID][vColor2] = cache_get_field_content_int(i, "vColor2", Mysql_users);
                vInfo[vID][vPrice] = cache_get_field_content_int(i, "vPrice", Mysql_users);
                cache_get_field_content(i, "vOwner", vInfo[vID][vOwner], Mysql_users, 126);
                vInfo[vID][vPosX] = cache_get_field_content_float(i, "vPosX", Mysql_users);
                vInfo[vID][vPosY] = cache_get_field_content_float(i, "vPosY", Mysql_users);
                vInfo[vID][vPosZ] = cache_get_field_content_float(i, "vPosZ", Mysql_users);
                vInfo[vID][vPosA] = cache_get_field_content_float(i, "vPosA", Mysql_users);
                cache_get_field_content(i, "vPlate", vInfo[i][vPlate], Mysql_users, 126);
                vInfo[vID][vPaintJ] = cache_get_field_content_int(i, "vPaintJ", Mysql_users);
                vInfo[vID][vLocked] = cache_get_field_content_int(i, "Locked", Mysql_users);
                vMods[vID][0] = cache_get_field_content_int(i, "vMod1", Mysql_users);
                vMods[vID][1] = cache_get_field_content_int(i, "vMod2", Mysql_users);
                vMods[vID][2] = cache_get_field_content_int(i, "vMod3", Mysql_users);
                vMods[vID][3] = cache_get_field_content_int(i, "vMod4", Mysql_users);
                vMods[vID][4] = cache_get_field_content_int(i, "vMod5", Mysql_users);
                vMods[vID][5] = cache_get_field_content_int(i, "vMod6", Mysql_users);
                vMods[vID][6] = cache_get_field_content_int(i, "vMod7", Mysql_users);
                vMods[vID][7] = cache_get_field_content_int(i, "vMod8", Mysql_users);
                vMods[vID][8] = cache_get_field_content_int(i, "vMod9", Mysql_users);
                vMods[vID][9] = cache_get_field_content_int(i, "vMod10", Mysql_users);
                vMods[vID][10] = cache_get_field_content_int(i, "vMod11", Mysql_users);
                vMods[vID][11] = cache_get_field_content_int(i, "vMod12", Mysql_users);
                vInfo[vID][vRida] = cache_get_field_content_float(i, "vRida", Mysql_users);


                vID = CreateVehicle(vInfo[vID][vModel], vInfo[vID][vPosX], vInfo[vID][vPosY], vInfo[vID][vPosZ], vInfo[vID][vPosA], vInfo[vID][vColor1], vInfo[vID][vColor2], 500000);
                SetVehicleNumberPlate(vID, vInfo[vID][vPlate]);
                ChangeVehiclePaintjob(vID, vInfo[vID][vPaintJ]);
                for(new iMod = 0; iMod < MAX_VEH_MODS; ++iMod)
                {
                    if(vMods[vID][iMod] > 0)
                    {
                        AddVehicleComponent(vID, vMods[vID][iMod]);
                    }
                }
                OwnedVeh(vID) = vID;
            }
        }
        return 1;
}
Mysql log
Код:
[22:31:18] [DEBUG] mysql_format - connection: 1, len: 4098, format: "SELECT * FROM `privateveh` WHERE `vID` < 200 ORDER BY vID"
[22:31:18] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `privateveh` WHERE `vID` < 200 ORDER BY vID", callback: "LoadPVehicles", format: "i"
[22:31:18] [DEBUG] CMySQLConnection::Connect - connection was successful
[22:31:18] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
in SQL vehicles have
Reply


Messages In This Thread
Vehicles doesn't load - by TheNerka - 13.10.2014, 19:36
Re: Vehicles doesn't load - by TheNerka - 14.10.2014, 06:19
Re: Vehicles doesn't load - by [TMS]Legena - 14.10.2014, 10:30
Re: Vehicles doesn't load - by TheNerka - 14.10.2014, 11:04
Re: Vehicles doesn't load - by TheNerka - 15.10.2014, 12:16

Forum Jump:


Users browsing this thread: 2 Guest(s)