24.05.2014, 12:39
Hi there, thanks for putting some time aside to read this, and perhaps, help me solve my problem.
I'm trying to save the players' stats in OnGameModeExit public, in the usual way I do it, it doesn't seem to be working.
Here's the code:
The printf was used to debug. Anyway, I checked the server log, and it doesn't show the printf message there. So I suppose it doesn't have enough time to reach it?
I'm getting the player name in OnPlayerConnect, so it should have it stored until the server is closed, or w/e.
Note: I'm closing it by pressing the red x. Dunno if the callback gets called when it's closed like that, any answer would be appreciated.
Note2: As you can obviously see, I am using MySQL.
I'm trying to save the players' stats in OnGameModeExit public, in the usual way I do it, it doesn't seem to be working.
Here's the code:
pawn Код:
for(i = 0; i < MAX_PLAYERS; i++)
{
printf("The player's name is %s", ppName[i]);
mysql_format(mysql, query, sizeof(query), "UPDATE `players` SET `Hours` = '%d', `Minutes` = '%d' WHERE `Username` = '%e'",PlayerInfo[i][Hours], PlayerInfo[i][Minutes], ppName[i]);
mysql_query(mysql, query);
}
I'm getting the player name in OnPlayerConnect, so it should have it stored until the server is closed, or w/e.
Note: I'm closing it by pressing the red x. Dunno if the callback gets called when it's closed like that, any answer would be appreciated.
Note2: As you can obviously see, I am using MySQL.