15.12.2013, 19:32
I load the server vehicles from the MySQL database.
But that's not my problem. The stock is all fine. But the server doesn't load completely. I mentioned vehicles because that's the last thing that appears which tells us that the server is loaded.
But that's not my problem. The stock is all fine. But the server doesn't load completely. I mentioned vehicles because that's the last thing that appears which tells us that the server is loaded.
pawn Код:
stock LoadCars()
{
new id = 1;
while(id < MAX_VEHICLES)
{
new modelid,Float:carx,Float:cary,Float:carz,Float:carzangle;
format(query,sizeof(query),"SELECT * FROM `cars` WHERE `id` = '%d'",id);
mysql_query(query);
mysql_store_result();
while(mysql_fetch_row_format(query,"|"))
{
if(mysql_num_rows())
{
mysql_fetch_field_row(data, "modelid"); modelid = strval(data);
mysql_fetch_field_row(data, "carx"); carx = floatstr(data);
mysql_fetch_field_row(data, "cary"); cary = floatstr(data);
mysql_fetch_field_row(data, "carz"); carz = floatstr(data);
mysql_fetch_field_row(data, "carzangle"); carzangle = floatstr(data);
CreateVehicle(modelid,carx,cary,carz,carzangle,random(225),random(225),60);
}
}
mysql_free_result();
id++;
}
return 1;
}