all cars dont load
#1

Код:
LoadOvehs()
{
	new query[128];
	format(query,128,"SELECT * FROM orgvehs ORDER BY VID ASC");
	mysql_query(query);
	mysql_store_result();
	

	while( mysql_retrieve_row())
	{
	new row[128];
	new field[13][128];
	new tmp;
	tmp = mysql_num_rows();
	mysql_fetch_row_format(row, "|");
	explode(row, field, "|");
	new mdl,vidid,Float:x,Float:y,Float:z,Float:r;
	mdl=strval(field[1]);
	x=strval(field[2]);
	y=strval(field[3]);
	z=strval(field[4]);
	r=strval(field[5]);

	vidid=CreateVehicle(mdl,x,y,z+1,r,0,1,-1);
	vorg[vidid]=strval(field[0]);
	}
	mysql_free_result();
	return 1;
}
only 4 cars load and there are more =(
Reply
#2

Try this, no guarantees, I'm drunk :S.

pawn Код:
LoadOvehs()
    {
    new query[128];
        format(query,128,"SELECT * FROM `orgvehs` ORDER BY `VID` ASC");
        mysql_query(query);
        mysql_store_result();
        while( mysql_retrieve_row())
        {
            new row[128];
            new field[13][128];
            if(mysql_num_rows() == 0) continue;
            mysql_fetch_row_format(query, "|");
            explode(query, field, "|");
            new mdl,vidid,Float:x,Float:y,Float:z,Float:r;
            mdl=strval(field[1]);
            x=strval(field[2]);
            y=strval(field[3]);
            z=strval(field[4]);
            r=strval(field[5]);
            vidid=CreateVehicle(mdl,x,y,z+1,r,0,1,-1);
            vorg[vidid]=strval(field[0]);
        }
        mysql_free_result();
        return 1;
}
Reply
#3

your way didnt work but i managedto solve it myself
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)