The online racing simulator
Automatic Messages
Plugin:


<?php 
class automessages extends Plugins
{
    const 
URL 'http://lfsforum.net/forumdisplay.php?f=312';
    const 
NAME 'Automatic Messages';
    const 
AUTHOR 'ScottLy';
    const 
VERSION PHPInSimMod::VERSION;
    const 
DESCRIPTION 'Sends automatic messages to server every 10 minutes';

    public function 
__construct()
    {
        
$this->registerPacket('onPrismConnect'ISP_VER);
        
        
#Automatic Messages Start
        
$this->line_number=0;
        
        
$this->lines = array(
        
"This is 1st automatic message. (Sent every 10 minutes)",
        
"This is 2nd automatic message. (Sent every 10 minutes)",
        
"This is 3rd automatic message. (Sent every 10 minutes)",
        
"This is 4th automatic message. (Sent every 10 minutes)",
        
"This is 5th automatic message. (Sent every 10 minutes)",
        
"This is 6th automatic message. (Sent every 10 minutes)",
        
"This is 7th automatic message. (Sent every 10 minutes)",
        
"This is 8th automatic message. (Sent every 10 minutes)",
        
"This is 9th automatic message. (Sent every 10 minutes)",
        
"This is 10th automatic message. (Sent every 10 minutes)"
        
);
        
        
$last_line array_keys($this->lines);
        
$this->total end($last_line);

        
#Automatic Messages End
    
}

    public function 
onPrismConnect(IS_VER $VER)
    {
        
$this->createTimer('Automatic_Messages'600Timer::REPEAT, array());
        
IS_MTC()->UCID(255)->Text("^7Automatic messages system is enabled")->Send();
    }
    
    public function 
Automatic_Messages()
    {
    
IS_MTC()->UCID(255)->Text($this->lines[$this->line_number])->Send();
    
$this->line_number $this->line_number 1;
    if(
$this->line_number $this->total)
    {
    
$this->line_number 0;
    }
    }
}

?>

Preview:

Automatic Messages
(1 post, started )
FGED GREDG RDFGDR GSFDG