ManiaLive is installed on my pc recently, and i want some plugins special, but i have a problem, i don't know how can i make plugin, i read this document : http://code.google.com/p/manialive/wiki/DeveloperDoc And i understand the most important of this.
Is there another more complete documentation on how to create plugins ? because i want in my first plugin to create 2 Admins command, I developed a plugin, but he doesn't work. It's difficult to create plugin only to look others plugins

I Need Help please, a documentation, or for resolve errors of that plugin.
I want to create 2 admins command, for mute and unmute all players except admins (for F1 races on TrackMania United)
I make that :
Code: Select all
<?php
namespace ManiaLivePlugins\BBP\MuteGP;
use ManiaLive\DedicatedApi\Connection;
use ManiaLive\Features\ChatCommand\Command;
use ManiaLive\Utilities\Console;
use ManiaLive\Data\Storage;
use ManiaLive\Config\Loader;
class MuteGP extends \ManiaLive\PluginHandler\Plugin {
private $desc = "Usage: /mutall";
private $help = "The mutall plugin mute/unmute all players except admins.
\$wUsage\$z:
\$o/mutall
\$o/unmutall";
function onInit() {
$this->setVersion(294);
$this->setPublicMethod('getVersion');
$this->setPublicMethod('addAdminCommand');
}
function onLoad() {
Console::println('['.date('H:i:s').'] [BBP] Plugin: MuteGP r'.$this->getVersion().' by Bo$$ Bravo.');
$this->addAdminCommand(array($this,'mutall'),array('mutall'),true,false,false);
$this->addAdminCommand(array($this,'unmutall'),array('unmutall'),true,false,false);
}
function mutall($fromLogin, $param1, $param2 = NULL, $param3 = NULL) {
foreach ($this->storage->players as $player) {
$admin = Storage::GetInstance()->getPlayerObject($fromLogin);
$this->connection->ignore($player);
}
$this->sendChat('$o$0aeAdmin $fff'.$admin->nickName.'$z$o$0ae Ignores All players except Admins');
}
function unmutall($fromLogin, $param1, $param2 = NULL, $param3 = NULL) {
$admin = Storage::GetInstance()->getPlayerObject($fromLogin);
foreach ($this->storage->players as $player) {
$this->connection->unIgnore($player);
}
$this->sendChat('$o$0aeAdmin $fff'.$admin->nickName.'$z$o$0ae unIgnores All players');
}
}
?>
And in config.ini :
Code: Select all
plugins.load[] = 'BBP\MuteGP'
The error is on that line :
Code: Select all
$this->setPublicMethod('addAdminCommand');
Thanks to help me. I'm a good developer but, i don't understand thatThe method "addAdminCommand" does not exist and therefor can not be exposed !

I never made a plugin on XAseco, ManiaLive or whatever, but I need more plugins for tm² server with ManiaLive, so I'd like you to help me !
Regards.
Bo$$ Bravo