23.11.2015, 22:22
I'm making a MySQL saving system, it's working completely fine so far. It's just that when I try to save the players health to the database, it puts all of that players variables, into all of the other players rows.
Again, it works as it should when I don't have the pHealth in there.. I'd very much appreciate some help with this.
Код:
public OnPlayerDisconnect(playerid, reason) { new query[128], Float:pos[3]; GetPlayerPos(playerid, pos[0], pos[1], pos[2]); mysql_format(mysql,query,sizeof(query), "UPDATE players SET Money='%d', Admin='%d', Skin='%d', Health='%f', PosX='%f', PosY='%f', PosZ='%f' WHERE ID='%d'", pMoney[playerid], pAdmin[playerid], pSkin[playerid], pHealth[playerid], pos[0], pos[1], pos[2], pID[playerid]); mysql_tquery(mysql,query,"",""); return 1; }