View Single Post
Old 24/07/2017, 09:18 AM   #9
skuller12
Big Clucker
 
Join Date: Feb 2015
Location: Galati, Romania
Posts: 101
Reputation: 0
Default Re: Problem connection mysql r41-3

Code:
function LoadCars()
{
	new Personal_Vehicles = cache_num_rows(), id;
	for(new i = 0; i < Personal_Vehicles; i++)
	{
		cache_get_value_name_int(i, "ID", id);
		cache_get_value_name_int(i, "ID", C_DATA[id][cSQLID]);
		cache_get_value_name_int(i, "UserID", C_DATA[id][cUserID]);
		cache_get_value_name(i, "Owner", C_DATA[id][cOwner], MAX_PLAYER_NAME);
		cache_get_value_name_int(i, "Model", C_DATA[id][cModel]);
		cache_get_value_name_int(i, "Color1", C_DATA[id][cColors][0]);
		cache_get_value_name_int(i, "Color2", C_DATA[id][cColors][1]);
		cache_get_value_name_float(i, "PosX", C_DATA[id][cPos][0]);
		cache_get_value_name_float(i, "PosY", C_DATA[id][cPos][1]);
		cache_get_value_name_float(i, "PosZ", C_DATA[id][cPos][2]);
		cache_get_value_name_float(i, "PosA", C_DATA[id][cPos][3]);
		cache_get_value_name(i, "Plate", C_DATA[id][cPlate], 10);
		cache_get_value_name(i, "CarName", C_DATA[id][cDesc], 30);
		cache_get_value_name_float(i, "KM", C_DATA[id][cKM]);
		for(new m = 0; m != 17; m++)
		{
			format(gString, 8, "Mod%d", m);
			cache_get_value_name_int(i, gString, C_DATA[id][cMods][m]);
		}
		cache_get_value_name_int(i, "PaintID", C_DATA[id][cPaintID]);
		cache_get_value_name_int(i, "Owned", C_DATA[id][cOwned]);
		cache_get_value_name_int(i, "Locked", C_DATA[id][cLock]);
		cache_get_value_name_int(i, "Days", C_DATA[id][cDays]);
		cache_get_value_name_int(i, "Fuel", C_DATA[id][cFuel]);
		cache_get_value_name_int(i, "Insurance", C_DATA[id][cInsurance]);
		cache_get_value_name_int(i, "Price", C_DATA[id][cPrice]);
		cache_get_value_name_int(i, "Neon", C_DATA[id][cNeon]);
		cache_get_value_name_int(i, "Spawned", C_DATA[id][cSpawned]);
		if(C_DATA[id][cSpawned] != 0) C_DATA[id][cSpawned] = 0, cUpdate(id, cSpawnedx);

		Total_P_Vehs = id;
	}
}
skuller12 is offline   Reply With Quote