11.01.2014, 11:27
Anyone can see why the position is not saving?
pawn Код:
stock SavePlayer(playerid)
{
if(!IsPlayerConnected(playerid))return 1;
new query[500];
GetPlayerPos(playerid, Player[playerid][PosX], Player[playerid][PosY], Player[playerid][PosZ]);
format(query, sizeof(query), "UPDATE accounts SET Name='%s', Password='%s', AdminLevel='%d', PosX='%f', PosY'%f', PosZ'%f' WHERE userid='%d' LIMIT 1",
pName(playerid),
Player[playerid][Password],
Player[playerid][AdminLevel],
Player[playerid][PosX],
Player[playerid][PosY],
Player[playerid][PosZ],
Player[playerid][UserID]);
mysql_query(query);
printf("%s (%d) has successfully saved account details in the database.", RemoveUnderScore(playerid), playerid);
return 1;
}