SA-MP Forums Archive
Timer, TKAdmin, DB - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Timer, TKAdmin, DB (/showthread.php?tid=445864)



Timer, TKAdmin, DB - $mooth - 23.06.2013

Hello, im using TKAdmin https://sampforum.blast.hk/showthread.php?tid=269610
Im trying to implement score and money per minute.
The thingy is, the money appers in the server but dosnt save on exit "in the database". Could i get some help

Quote:

Above OnGameModeInit:

new moneyTimers[MAX_PLAYERS];

OnPlayerConnect:

moneyTimers[playerid] = SetTimerEx("MoneyGive", 60000, true, "i", playerid);

OnPlayerDisconnect:
KillTimer(moneyTimers[playerid]);

In somewhere in ur script:

forward MoneyGive(playerid);
public MoneyGive(playerid)
{
GivePlayerMoney(playerid, 100);
}




Re: Timer, TKAdmin, DB - Mystique - 23.06.2013

You should use a saving system such as this one. https://sampforum.blast.hk/showthread.php?tid=175565