all cars dont load - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: all cars dont load (
/showthread.php?tid=221246)
all cars dont load -
THE_KNOWN - 05.02.2011
Код:
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 =(
Re: all cars dont load -
PeteShag - 05.02.2011
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;
}
Re: all cars dont load -
THE_KNOWN - 05.02.2011
your way didnt work but i managedto solve it myself