11.08.2010, 19:37
Well the debugging you've added wouldn't help much since you did it before you even used sscanf to split up the results.
That should give you a better idea of wether the query is working or not and what information is coming back
pawn Код:
new query [256], result[256], Float:X, Float:Y, Float:Z, Float:A;
format(query,256,"SELECT `x`,`y`,`z`,`ang` FROM factions WHERE id = '%d'",playerinfo[playerid][Faction]);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(result);
printf("Result contents: %s",result);
sscanf(result,"ffff",X,Y,Z,A);
printf("X: %f", X);
printf("Y: %f", Y);
printf("Z: %f", Z);
mysql_free_result();
SetPlayerPos(playerid, X, Y, Z);
SetPlayerFacingAngle(playerid, A);
SetPlayerInterior(playerid, 0);
