13.03.2014, 07:34
Why doesnt this code save my player position?
Anyone?
Will +Rep
Код:
stock SaveStats(playerid) { new query[256]; new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); PlayerInfo[playerid][PosX] = x; PlayerInfo[playerid][PosY] = y; PlayerInfo[playerid][PosZ] = z; format(query, sizeof(query), "UPDATE playerdata SET Cash=%i PosX=%f AND PosY=%f AND PosZ=%f WHERE Name='%s'", PlayerInfo[playerid][Cash], PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosX], GetName(playerid)); mysql_query(query); printf("Player Saved"); return 1; }
Will +Rep