26.03.2016, 04:20
pawn Код:
new tmrGMX;
new gGMXTick;
// When you start your GMX timer
// This part of code can be in your command
tmrGMX = SetTimer("OnServerRestarting", 1000, true);
gGMXTick = 10; // These are in seconds
// Declaring the timer
forward OnServerRestarting();
public OnServerRestarting()
{
gGMXTick--;
if (gGMXTick == 0)
{
GameTextForAll("~g~Server restarted!", 1000, 0);
KillTimer(tmrGMX);
SendRconCommand("gmx");
}
else
{
new string[35];
format(string, sizeof (string), "~r~Restart in %i...", gGMXTick);
GameTextForAll(string, 1000, 0);
}
}