CarOwner var problem;
#9

This ill help? ;-;

Quote:

forward Car_Load();
public Car_Load()
{
static
rows,
fields,
str[128];

cache_get_data(rows, fields, g_iHandle);

for (new i = 0; i < rows; i ++) if (i < MAX_DYNAMIC_CARS)
{
CarData[i][carExists] = true;
CarData[i][carID] = cache_get_field_int(i, "carID");
CarData[i][carModel] = cache_get_field_int(i, "carModel");
CarData[i][carOwner] = cache_get_field_int(i, "carOwner");
CarData[i][carPos][0] = cache_get_field_float(i, "carPosX");
CarData[i][carPos][1] = cache_get_field_float(i, "carPosY");
CarData[i][carPos][2] = cache_get_field_float(i, "carPosZ");
CarData[i][carPos][3] = cache_get_field_float(i, "carPosR");
CarData[i][carColor1] = cache_get_field_int(i, "carColor1");
CarData[i][carColor2] = cache_get_field_int(i, "carColor2");
CarData[i][carPaintjob] = cache_get_field_int(i, "carPaintjob");
CarData[i][carLocked] = cache_get_field_int(i, "carLocked");
CarData[i][carImpounded] = cache_get_field_int(i, "carImpounded");
CarData[i][carImpoundPrice] = cache_get_field_int(i, "carImpoundPrice");
CarData[i][carFaction] = cache_get_field_int(i, "carFaction");

for (new j = 0; j < 14; j ++)
{
if (j < 5)
{
format(str, sizeof(str), "carWeapon%d", j + 1);
CarData[i][carWeapons][j] = cache_get_field_int(i, str);

format(str, sizeof(str), "carAmmo%d", j + 1);
CarData[i][carAmmo][j] = cache_get_field_int(i, str);
}
format(str, sizeof(str), "carMod%d", j + 1);
CarData[i][carMods][j] = cache_get_field_int(i, str);
}
Car_Spawn(i);
}
for (new i = 0; i < MAX_DYNAMIC_CARS; i ++) if (CarData[i][carExists]) {
format(str, sizeof(str), "SELECT * FROM `carstorage` WHERE `ID` = '%d'", CarData[i][carID]);

mysql_tquery(g_iHandle, str, "OnLoadCarStorage", "d", i);
}
return 1;
}

Reply


Messages In This Thread
CarOwner var problem; - by MineiriinHo - 31.10.2016, 16:30
Re: CarOwner var problem; - by MEW273 - 31.10.2016, 17:08
Re: CarOwner var problem; - by MineiriinHo - 31.10.2016, 17:24
Re: CarOwner var problem; - by jlalt - 31.10.2016, 17:29
Re: CarOwner var problem; - by MineiriinHo - 31.10.2016, 17:57
Re: CarOwner var problem; - by ThatFag - 31.10.2016, 18:23
Re: CarOwner var problem; - by MineiriinHo - 31.10.2016, 18:46
Re: CarOwner var problem; - by MEW273 - 31.10.2016, 18:49
Re: CarOwner var problem; - by MineiriinHo - 31.10.2016, 18:52
Re: CarOwner var problem; - by Logic_ - 31.10.2016, 19:01

Forum Jump:


Users browsing this thread: 2 Guest(s)