09.11.2009, 18:03
Code:
stock CarregarVeiculos() { for(new b = 0; b < MAX_VEHICLES; b++) { new string[256]; format(string, 256, "SELECT * FROM carros WHERE id = %d", b); mysql_query("SELECT * FROM carros WHERE id = 2"); mysql_store_result(); new rows = mysql_num_rows(); if(rows == 1) { new dono[256]; new Float:x, Float:y, Float:z, Float:angulo; new modelo, gasolina; format(string, 256,"SELECT dono FROM `carros` WHERE id = '%d' LIMIT 1", b); mysql_query(string); mysql_store_result(); mysql_fetch_field_row(dono, "dono"); format(string, 256,"SELECT p_x FROM `carros` WHERE id = '%d' LIMIT 1", b); mysql_query(string); mysql_fetch_float(x); format(string, 256,"SELECT p_y FROM `carros` WHERE id = '%d' LIMIT 1", b); mysql_query(string); mysql_store_result(); mysql_fetch_float(y); format(string, 256,"SELECT p_z FROM `carros` WHERE id = '%d' LIMIT 1", b); mysql_query(string); mysql_store_result(); mysql_fetch_float(z); format(string, 256,"SELECT angulo FROM `carros` WHERE id = '%d' LIMIT 1", b); mysql_query(string); mysql_store_result(); mysql_fetch_float(angulo); format(string, 256,"SELECT modelo FROM `carros` WHERE id = '%d' LIMIT 1", b); mysql_query(string); mysql_store_result(); modelo = mysql_fetch_int(); format(string, 256,"SELECT gasolina FROM `carros` WHERE id = '%d' LIMIT 1", 2); mysql_query(string); mysql_store_result(); gasolina = mysql_fetch_int(); printf("Dono = %s", dono); printf("X = %f", x); printf("Modelo = %d", gasolina); } } return 1; }
What can this be?
Sorry my bad english. I am brazilian