Habe nun 3 Stocks probiert, keiner von denen funktionierte.
(Ich benutze Strickenkids Plugin)
stock LFC()
{
new str[2];
new p;
for(new i; i < MAX_CARS; i++)
{
format(str,2,"%d",i);
FCInfo[i][modelid] = mysql_GetInt("frakcar", "Model", "ID", str);
FCInfo[i][fcc1] = mysql_GetInt("frakcar", "Farbe", "ID", str);
FCInfo[i][Frakid] = mysql_GetInt("frakcar", "Fraktion", "ID", str);
FCInfo[i][fcx] = mysql_GetFloat("frakcar", "X", "ID", str);
FCInfo[i][fcy] = mysql_GetFloat("frakcar", "Y", "ID", str);
FCInfo[i][fcz] = mysql_GetFloat("frakcar", "Z", "ID", str);
FCInfo[i][fca] = mysql_GetFloat("frakcar", "Angle", "ID", str);
Fraccar[i] = CreateVehicle(FCInfo[i][modelid], FCInfo[i][fcx], FCInfo[i][fcy], FCInfo[i][fcz], FCInfo[i][fca], FCInfo[i][fcc1], FCInfo[i][fcc1], -1);
p++;
}
printf("%d Autos geladen", p);
}
stock LFC()
{
new Load[16];
mysql_query("SELECT * FROM `frakcar`");
mysql_store_result();
for(new idx; idx< MAX_CARS; idx++)
{
mysql_fetch_row(Load, "Model");
FCInfo[idx][modelid] = strval(Load);
mysql_fetch_row(Load, "X");
FCInfo[idx][fcx] = floatstr(Load);
mysql_fetch_row(Load, "Y");
FCInfo[idx][fcy] = floatstr(Load);
mysql_fetch_row(Load, "Z");
FCInfo[idx][fcz] = floatstr(Load);
mysql_fetch_row(Load, "Angle");
FCInfo[idx][fcc1] = strval(Load);
mysql_fetch_row(Load, "Farbe");
FCInfo[idx][fcc1] = strval(Load);
mysql_fetch_row(Load, "Fraktion");
FCInfo[idx][Frakid] = strval(Load);
mysql_fetch_row(Load, "ID");
FCInfo[idx][sqlid] = strval(Load);
Fraccar[idx] = CreateVehicle(FCInfo[idx][modelid],FCInfo[idx][fcx],FCInfo[idx][fcy],FCInfo[idx][fcz],FCInfo[idx][fca],FCInfo[idx][fcc1],FCInfo[idx][fcc1],-1);
}
mysql_free_result();
}
stock LFC()
{
new i;
new query[256];
new data[256];
new field[7][32];
format(query, sizeof(query),"SELECT Model, X, Y, Z, Angle, Fraktion, Farbe FROM `frakcar` WHERE `ID` = '%d'",i);
mysql_query(query);
mysql_store_result();
while (mysql_fetch_row(data))
{
split(data, field, '|');
i++;
FCInfo[i][Frakid] = strval(field[5]);
Fraccar[i] = CreateVehicle(strval(field[0]),floatstr(field[1]),floatstr(field[2]),floatstr(field[3]),floatstr(field[4]), strval(field[6]),strval(field[6]),-1);
}
mysql_free_result();
}
Kann mir jemand sagen welcher ansatzweise Richtig ist & wo der Fehler ist?