18.01.2011, 15:08
Okay, the problem here is simple, think about what you're doing. You're using sscanf to split up the formatted string, that isn't going to work because the information isn't stored there, use mysql_fetch_row_format() to store the information you're looking for in the "dat" array, for example:
pawn Код:
new dat[256], string[100], Float:x, Float:y, Float:z;
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "SELECT x, y, z FROM User WHERE `Name`='%s'", name);
mysql_query(string),
mysql_store_result();
mysql_fetch_row_format(dat,"|");
sscanf(dat, "p<|>fff",x, y, z);
format(string, sizeof(string), "%f,%f,%f", x, y, z);
SendClientMessage(playerid, GREY, string);
mysql_free_result();