Execute this irc cmd - 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: Execute this irc cmd (
/showthread.php?tid=307132)
Execute this irc cmd -
Face9000 - 29.12.2011
Hello guys,i've this IRC Command to save all players online stats:
pawn Код:
IRCCMD:saveall(botid, channel[], user[], host[], params[])
{
if(!IRC_IsOp(IRC_EchoConnection[0],EchoChan,user)) return AccessDenied(user);
if(EchoStatus == 0) return 1;
for(new i=0; i<=MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) SavePlayer(i);
}
return 1;
}
I need it to execute automatically every 10 minutes,instead of executing manually.
How i can?Thanks.
Re: Execute this irc cmd -
FarSe. - 29.12.2011
pawn Код:
SetTimer("SaveAllPlayersStats",10*60*1000,1);
forward SaveAllPlayersStats();
public SaveAllPlayersStats()
{
for(new i=0; i<=MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) SavePlayer(i);
}
}