12-20-2012, 02:43
(12-20-2012, 00:15)XxBRxX Wrote:(12-19-2012, 18:45)[Z00MBY] Alex Wrote: This works for me perfectly. I checked out. I cited an example. To use it or not, decide for yourself.
hey guys.
I pull some lines that gave me error.
tego version of teknogods v206..
I'll see if it works that way.
Code:using System;
using System.Collections.Generic;
using Addon;
using System.Collections;
namespace mes
{
public class mes : CPlugin
{
int Interval;
public override void OnMapChange()
{
Interval = 0;
}
public override void OnFastRestart()
{
Interval = 0;
}
public override void OnServerFrame()
{
List<ServerClient> clients;
try
{
clients = GetClients();
if (clients != null)
{
foreach (ServerClient client in GetClients())
{
{
if (Interval <= 0)
{
iPrintLn("message", null);
Interval = 60 * 60; // period 60 sec
}
}
}
}
}
catch (Exception e)
{
ServerPrint("Error in mes plugin: \n" +
e.Message + "\n" +
e.StackTrace + "\n" +
e.Source + "\n" +
e.InnerException + "\n" +
e.HelpLink);
}
if (Interval > 0)
Interval--;
}
}
}
worked perfectly!
Thank you very much man!