How could I do a system to update player informations in Database ?
#6

Quote:
Originally Posted by ikey07
Посмотреть сообщение
you dont need to update every x time, you need to update when field value changes, like player money, save it only when when player get/lose money.

GivePlayerMoneyEx(playerid,amount)
{
mysql_query...
GivePlayerMoney(playerid,amount);
}
This is definetly a good idea.
Or you can updeate the player's data only when he disconnects.

EDIT: In that case just set up a timer under OnGameModeInit.
Be sure to use threaded queries, and don't use them too often, or you will experience lag with large ammount of players online.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)