13.04.2018, 12:20
Код:
#define MYSQL_HOST "localhost" #define MYSQL_USER "root" #define MYSQL_PASS "" #define MYSQL_DB "nerp" stock SavePlayerData(playerid) { new query[512]; GetPlayerPos(playerid, PlayerInfo[playerid][posX], PlayerInfo[playerid][posY], PlayerInfo[playerid][posZ]); mysql_format(MYSQL, query, sizeof(query), "UPDATE players SET `posX`='%f',`posY`='%f',`posZ`='%f' WHERE `ID`='%d'",PlayerInfo[playerid][posX], PlayerInfo[playerid][posY], PlayerInfo[playerid][posZ], PlayerInfo[playerid][pID]); mysql_tquery(MYSQL, query, "", ""); // ============== HERE, AT HANDLE================= return 1; }