13.08.2014, 22:42
Hello,
I'm trying to get all the outside coords from my houses to place some icons on the map but the only thing i now get is 000000 000000 000000.
but there are 2 records into my db so i think my while loop is kinda wrong, can someone explain me how this while loop works on samp. I'm using the mysql R34.
Thnx,
Tom
I'm trying to get all the outside coords from my houses to place some icons on the map but the only thing i now get is 000000 000000 000000.
but there are 2 records into my db so i think my while loop is kinda wrong, can someone explain me how this while loop works on samp. I'm using the mysql R34.
Код:
forward loadHouses(playerid); public loadHouses(playerid){ SendClientMessage(playerid,YELLOW,"Loading houses..."); new query[128],message[200],Float:Xc,Float:Yc,Float:Zc; mysql_format(mysql, query, sizeof(query),"SELECT `OX`, `OY`, `OZ` FROM `houses`"); mysql_tquery(mysql, query, "", ""); mysql_store_result(); while(mysql_fetch_row(query)) { new b[256]; mysql_fetch_field_row(b,"OX"); Xc = strval(b); mysql_fetch_field_row(b,"OY"); Yc = strval(b); mysql_fetch_field_row(b,"OZ"); Zc = strval(b); format(message, sizeof(message), "%f %f %f",Xc,Yc,Zc); SendClientMessage(playerid,YELLOW,message); } mysql_free_result(); }
Tom