<?php

Aseco::registerEvent('onEverySecond', 'infos_everysecond');

global $lastinfotime;
global $infointerval;
global $infos;
global $startindex;
$infointerval = 60; //message interval in seconds
$infos = array();

//define your messages
$infos[] = 'thank you for making a donation to save the server';
$infos[] = 'merci de faire un don pour la sauvegarder des serveurs linux';
$infos[] = 'merci d avance a tout les donateurs!';

// ...

$lastinfotime = 0;
$startindex = 0;

function infos_everysecond($aseco){
   global $lastinfotime, $infointerval, $infos, $startindex;
   $time = time();
   if ($lastinfotime + $infointerval <= $time){
      $lastinfotime = $time;

      //output info
      $aseco->client->query('ChatSendServerMessage', $infos[$startindex]);
      $startindex = ($startindex+1)%count($infos);
   }
}

?>
