10.04.2017, 08:09
Hello, everyone. I've been trying from a while to save the player data upon the player leaves the server, I've been trying to script it from a long time but I keep on getting error in one line ( marked it on the code provided below ). Can anyone help me out to resolve this issue and explain of where I went wrong? ( Plug version is R39-9 ).
PHP код:
new Query[900];
GetPlayerName(playerid, Query, MAX_PLAYER_NAME);
mysql_real_escape_string(Query, Query);
format(Query, sizeof(Query), "UPDATE `accounts` SET `Admin` = '%d', `VIP` = '%d', `Money` = '%d', `Kills` = '%d', `Deaths` = '%d', `Score` = '%d' WHERE `Name` = '%s'",
Player[playerid][Admin],
Player[playerid][VIP],
Player[playerid][Money],
Player[playerid][Kills],
Player[playerid][Deaths],
Player[playerid][Score],
Query);
mysql_query(Query);
return 1;
}