07.02.2011, 15:35
Код:
LoadOcps() { new query[256]; format(query,256,"SELECT * FROM `ocps`"); mysql_query(query); mysql_store_result(); new tmp=mysql_num_rows(); for( new i=mysql_retrieve_row();i<tmp;i++) { new field[13][128]; if(mysql_num_rows() == 0) continue; mysql_fetch_row_format(query, "|"); explode(query, field, "|"); new cpid,Float:x,Float:y,Float:z; x=strval(field[1]); y=strval(field[2]); z=strval(field[3]); cpid=CreateDynamicCP(x,y,z,1.0,-1,-1,-1,100.0); corg[cpid]=strval(field[0]); } mysql_free_result(); return 1; }
i just modified this code for cps it was originally made for cars which works