12.02.2011, 06:37
Код:
LoadDcar() { new q[128]; format(q,128,"SELECT * FROM dealer"); mysql_query(q); mysql_store_result(); new tp; tp=mysql_num_rows(); for(new i=mysql_retrieve_row();i<tp;i++) { new field[7][32]; mysql_fetch_row_format(q,"|"); explode(q,field,"|"); new tmp,mdl,Float:x,Float:y,Float:z,Text3D:txt,p,Float:a; new s[32]; mdl=strval(field[1]); x=strval(field[2]); y=strval(field[3]); z=strval(field[4]); p=strval(field[5]); a=strval(field[6]); tmp=CreateVehicle(mdl,x,y,z+1,a,0,1,-1); price[tmp]=p; format(s,32,"Price:%d",p); txt=Create3DTextLabel(s,1,0.0,0.0,0.0,60.0,-1,0); Attach3DTextLabelToVehicle(txt,tmp,0.0,0.0,0.0); } mysql_free_result(); return 1; }