Status In VPS [HELP]
#5

Why do you need to save the stats every second? No need. You should rather change the stats when something certain happens, it's more efficient and better. Use callbacks for that
Anyways, if you really wanna do that every second, then:
pawn Код:
new EverySecTimer[MAX_PLAYERS];
//under OnPlayerConnect
EverySecTimer[playerid] = SetTimer("StatsChanger",1000,true);
//outside a callback
forward StatsChanger();
public StatsChanger()
{
//code here
}
//under OnPlayerDisconnect
KillTimer(EverySecTimer[playerid]);
Reply


Messages In This Thread
Status In VPS [HELP] - by M0HAMMAD - 16.06.2014, 17:01
Re: Status In VPS [HELP] - by M0HAMMAD - 16.06.2014, 18:28
Re: Status In VPS [HELP] - by Stinged - 16.06.2014, 18:40
Re: Status In VPS [HELP] - by VladimirMark - 16.06.2014, 19:50
Re: Status In VPS [HELP] - by NaClchemistryK - 16.06.2014, 19:54

Forum Jump:


Users browsing this thread: 2 Guest(s)