Quote:
Originally Posted by Campbell-
- It doesn't matter whether the player crashes, gets kicked/banned, times out or disconnects. The functions GetPlayerScore(), GetPlayerMoney(), ... work at all times in the OnPlayerDisconnect()-Callback. There is no need to save any data at all times in other data structures just for the case that a player crashes.
- Threaded queries are not faster at all. They just get processed on another thread of the process running to avoid the actual script to stop until the query is fully processed.
- Why are you still using BlueG's MySQL R5? It is outdated, filled with bugs and less efficient with less functionality.
- The code below works just fine ...
pawn Код:
public OnPlayerDisconnect(playerid, reason) { saveData(playerid); return 1; }
saveData(playerid) { // BlueG's MySQL Plugin R38 new query[100]; mysql_format(handle, query, sizeof(query), "UPDATE `samp_users` SET `pScore` = %i, `pMoney` = %i WHERE `pID` = %i;", GetPlayerScore(playerid), GetPlayerMoney(playerid), playerDatabaseID); mysql_tquery(handle, query, "", ""); }
|
thanks for your explaination.....
+REP for all