SA-MP Forums Archive
Server doesn't load completely - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server doesn't load completely (/showthread.php?tid=481474)



Server doesn't load completely - Tayab - 15.12.2013

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!


Re: Server doesn't load completely - xVIP3Rx - 15.12.2013

The vehicles load code please..


Re: Server doesn't load completely - Tayab - 15.12.2013

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.

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;
}