Hallo liebe Breadis ich habe Probleme die Autos aus der DB zu laden.
Ich verwende das Plugin von G-sTyLeZzZ's Version R5;
Hier der Code:
new Float:CX,Float:CY,Float:CZ,Float:Crot;
new Cmodel,Cc1,Cc2,Cid;
mysql_query("SELECT * FROM `fautos`");
mysql_store_result();
while(mysql_retrieve_row()) //this will be running until all rows are processed
{
new result[50];
mysql_fetch_field_row(result,"x");
CX = floatstr(result);
mysql_fetch_field_row(result,"y");
CY = floatstr(result);
mysql_fetch_field_row(result,"z");
CZ = floatstr(result);
mysql_fetch_field_row(result,"rot");
Crot = floatstr(result);
mysql_fetch_field_row(result,"model");
Cmodel = strval(result);
mysql_fetch_field_row(result,"col1");
Cc1 = strval(result);
mysql_fetch_field_row(result,"col2");
Cc2 = strval(result);
mysql_fetch_field_row(result,"a_id");
Cid = strval(result);
if(Cmodel > 0)
{
new carid = CreateVehicle(Cmodel, CX,CY,CZ, Crot, Cc1, Cc2, -1);
FAutos[carid][cID] = Cid;
}
}
mysql_free_result();