17.08.2011, 21:47
My first suggestion :
Then the function called by SetTimer,
pawn Код:
command(announcerestart, playerid, params[])
{
new string[ 128 ];
if(YOURGETADMINFUNCTIONHERE(playerid) < DESIREDADMINLEVEL) return SendClientMessage(playerid, 0x0, "You need to be at least DESIREDADMINLEVEL to use this command");
format(string, sizeof(string), "Admin : %s [ %d ] has announced an restart, please park / land your vehicles.");
SendClientMessageToAll(0x0, string);
return SetTimer("OnGmxRestart", 30 * 1000, false); // Not sure if you could use SetTimerEx and call SendRconCommand("gmx"); inside it.
} // Zcmd
pawn Код:
forward OnGmxRestart();
public OnGmxRestart()
{
return SendRconCommand("gmx");
}