plugin set timelimit in TA mode

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Post Reply
jouko100
speedy pilot
speedy pilot
Posts: 375
Joined: 10 Mar 2007 09:33
Location: finland

plugin set timelimit in TA mode

Post by jouko100 » 23 Jul 2010 08:48

masteradmin command.
In game use /limit xxx ,xxx= seconds
Name plugin limit.php and put it to plugins directory.
Add line
<plugin>limit.php</plugin>
to plugins.xml



Code: Select all

<?php
// made  by Jou**************************************************
// in game use /limit XXX  , XXX in seconds

Aseco::addChatCommand('limit', 'limit');
function chat_limit($aseco, $command) {
$admin = $command['author'];
   $login = $admin->login;
   $player = $aseco->server->players->getPlayer($login);
   $playernick = ($player->nickname);
if ($aseco->isMasterAdmin($admin)) {

$command['params'] = explode(' ', $command['params'], 1);
$limit = $command['params'][0]*1000;

if ($aseco->server->getGame() == 'TMF') {
      // check for TMUF server           
            settype($limit,'integer');
            $aseco->client->query('SetTimeAttackLimit',$limit);
}
}           
}
?>

Post Reply