15.04.2017, 18:23
Hello guys,
I currently have a savepos system in mysql that saves your positition on registration and can load it without a problem. The only thing that doesn't work is saving the position OnPlayerDisconnect. When I log out the data at the table doesn't change. This is my code:
I currently have a savepos system in mysql that saves your positition on registration and can load it without a problem. The only thing that doesn't work is saving the position OnPlayerDisconnect. When I log out the data at the table doesn't change. This is my code:
Код:
new DB_Query[256]; GetPlayerPos(playerid, pData[playerid][PosX], pData[playerid][PosY], pData[playerid][PosZ]); mysql_format(MYSQL_CONNECT, DB_Query, sizeof(DB_Query), "UPDATE `Players` SET `PosX` = %f, `PosY` = %f, `PosZ` = %f WHERE `SQLID` = %d LIMIT 1", pData[playerid][PosX], pData[playerid][PosY], pData[playerid][PosZ], pData[playerid][SQLID]);