28.06.2018, 17:36
when you dont enter player text into string there isnt no need to escape format it.
but when you need to load many things i would suggest you to use threaded query.
but when you need to load many things i would suggest you to use threaded query.
PHP код:
public LoadObject()
{
new Cache:cq=mysql_query(handle,"select * from material"),r=cache_num_rows();
for(new i; i < r; i++){
cache_get_value_name_int(i, "modelid", iMaterial[i][modelid]);
cache_get_value_float(i, "posx", iMaterial[i][m_x]);
cache_get_value_float(i, "posy", iMaterial[i][m_y]);
cache_get_value_float(i, "posz", iMaterial[i][m_z]);
cache_get_value_name(i, "3dtext", iMaterial[i][mText]);
material[i] = CreateDynamicObject(iMaterial[i][modelid],iMaterial[i][m_x],iMaterial[i][m_y],iMaterial[i][m_z] - 1.0, 0.0, 0.0, 0.0, 0);
}
cache_delete(cq);
return 1;
}