Command server
#2

yes you can...
you can use a rcon cmd, which would mean that you don't have to be on the server but on the console..
another way (indepent from you) would be to use a timer or just a gettime function...

if you want to send the msg in a certain period then you could use this:

pawn Код:
public OnGameModeInit()
{
  SetTimer("SendMessage", seconds * 1000, true); //replace seconds with the amount of seconds you want to use..
  return 1;
}

forward SendMessage();
public SendMessage()
{
  SendClientMessageToAll(COLOR, "text");
  return 1;
}
or with gettime (this requires a timer, too)
pawn Код:
public OnGameModeInit()
{
  SetTimer("CheckTime", 30000, true);
  return 1;
}

forward CheckTime();
public CheckTime()
{
  new h, m, s;
  gettime(h, m, s); //h = hour, m = minute, s = second
  if(h == 12 && m == 0) //change the numbers (12 and 0) to the hour and minute you want the msg to show.
  {
    SendClientMessageToAll(COLOR, "text");
  }
  return 1;
}
Reply


Messages In This Thread
Command server - by StilThere - 13.05.2011, 14:52
Re: Command server - by Sascha - 13.05.2011, 15:12
Re: Command server - by StilThere - 13.05.2011, 16:10
Re: Command server - by Seven_of_Nine - 13.05.2011, 16:30
Re: Command server - by StilThere - 13.05.2011, 16:45

Forum Jump:


Users browsing this thread: 4 Guest(s)