08.11.2015, 18:23
What is CODE to save player stats?
I made a tutorial about this, click here:
[SYE] Mysql Register/Load/Save Player System Glad to help =) |
mysql_format(DB_CON, query, sizeof(query), "UPDATE `players` SET `Age`=%d WHERE `ID`=%d", PlayerInfo[playerid][pAge], PlayerInfo[playerid][pAccountID]);
mysql_tquery(DB_CON, query);
Depending on the SQL you use, it all depends on the code you should be using.
The query should be: pawn Код:
|
// Setup local variables
new query[200], ban_query[200], playerName[24], playersName[24], playersIP[16];
GetPlayerName(playerid, playerName, 24);
format(query, sizeof(query), "SELECT `playerName` FROM `playerdata` WHERE playerName = '%s' LIMIT 1", playerName);
mysql_query(query, MYSQL_RESULT_CHECK, playerid, connection);
GetPlayerName(playerid, playersName, sizeof(playersName));
GetPlayerIp(playerid, playersIP, sizeof(playersIP));