SA-MP Forums Archive
Status In VPS [HELP] - 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: Status In VPS [HELP] (/showthread.php?tid=519944)



Status In VPS [HELP] - M0HAMMAD - 16.06.2014

Hi All
I Use The "San Fierro Cops-Robbers-RPG v1.1" Game Mode
So. I Run The Server And This Is The Problem.
The Player Status Is Every 2 Minutes.
I Don't Know It's 2 Minutes Or ...
But This Is The Problem
I Want The Status Every Second Save.
Who Can Help Me?
---------------------------------
I Give The Player Rank Helper and I Reseat The Server And The Player Rank was Normal :O


Re: Status In VPS [HELP] - M0HAMMAD - 16.06.2014

UP...........


Re: Status In VPS [HELP] - Stinged - 16.06.2014

Quote:

bumping a topic in which you have or require further information is allowed after at least 24 hours

Why don't you follow the rules..


Re: Status In VPS [HELP] - VladimirMark - 16.06.2014

Why do you want the stats to save every second? Better create a command that saves the stats if there isn't. If the player disconnects the status aren't saving?
And also what is the point if the server is hosted on VPS or on your computer? It's the script that make the status save every 2 minutes if you say so.


Re: Status In VPS [HELP] - NaClchemistryK - 16.06.2014

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]);