15.12.2013, 19:20
Hey, I am running the server in the localhost and as I run the samp-server.exe it doesn't load completely, like it doesn't show the number of vehicles.
Please help!
Please help!
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;
}