02.04.2011, 08:04
pawn Код:
stock LoadOvehs()
{
mysql_debug(1);
new
query[128],
field[13][128],
c1,
c2;
mysql_query("SELECT * FROM `orgvehs`");
mysql_store_result();
if(mysql_num_rows() > 0)
{
while(mysql_fetch_row(query))
{
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]);
c1=strval(field[6]);
c2=strval(field[7]);
vidid=CreateVehicle(mdl,x,y,z+0.2,r,c1,c2,-1);
vorg[vidid]=strval(field[0]);
}
}
mysql_free_result();
mysql_debug(0);
return 1;
}