24.10.2014, 19:30
Ola boa tarde galera
O meu problema e assim eu estou colocando para salvar desta maneira
Ele salva tranquilo sу que quando ele vai colocar na DB ele coloca os posX posY posZ errado
SQL Log
Esse e o Local onde Parei
-196.7116, 250.1295, 12.0781
E quando o salvamento vai pra data base vai assim
10 223 3 = com a SQL da Data base em IN
E com os Float
9.703, 232.467, 12.0781
O meu problema e assim eu estou colocando para salvar desta maneira
Код:
public OnPlayerDisconnect(playerid, reason) { player[playerid][E_PLAYER_LOGGED] = 0; new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); pInfo[playerid][posX] = x; pInfo[playerid][posY] = y; pInfo[playerid][posZ] = z; new money = GetPlayerMoney(playerid); new query[300], pname[24]; GetPlayerName(playerid, pname, 24); mysql_format(mysql, query, sizeof(query), "UPDATE players SET admin=%d, VIP=%d, Money=%d, PosX=%f, PosY=%f, PosX=%f WHERE Username='%s'", pInfo[playerid][Admin], pInfo[playerid][VIP], money, pInfo[playerid][posX], pInfo[playerid][posY], pInfo[playerid][posZ], pname); mysql_tquery(mysql, query, "", ""); return 1; }
SQL Log
Код:
[17:23:39] [DEBUG] mysql_format - connection: 1, len: 300, format: "UPDATE players SET admin=%d, VIP=%d, Money=%d, PosX=%f, PosY=%f, PosX=%f WHERE Username='%s'" [17:23:39] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE players SET admin=0, VIP=0, Money=175, PosX=9.703, PosY=2", callback: "(null)", format: "(null)" [17:23:39] [DEBUG] CMySQLQuery::Execute[] - starting query execution [17:23:39] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 34.944 milliseconds [17:23:39] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
-196.7116, 250.1295, 12.0781
E quando o salvamento vai pra data base vai assim
10 223 3 = com a SQL da Data base em IN
E com os Float
9.703, 232.467, 12.0781