Ant wrote: ↑08 Jun 2011 16:31
Ok, I've tried these 2 now:
Code: Select all
Aseco::registerEvent('onEndRace', 'hide_menu');
function hide_menu($aseco){
$xml = '<manialink id='.$this->manialinkID.'1001'.'></manialink>';
$aseco->client->query("SendDisplayManialinkPage", $xml, 1, false);
}
Code: Select all
Aseco::registerEvent('onEndRace', 'hide_menu');
function hide_menu($aseco){
$xml = '<manialink id='.$this->manialinkID.'0000'.'></manialink>';
$aseco->client->query("SendDisplayManialinkPage", $xml, 1, false);
}
Neither seem to work, so I'm pretty stumped as to how to achieve this TheBigG - sorry mate.
I've done it this way ^^
Add new event //Under Line: 13
Code: Select all
Aseco::registerEvent('onEndRace', 'fufiMenu_Off');
Search for... //Line: 888
Code: Select all
function fufiMenu_newChallenge($aseco){
global $fufiMenu;
$fufiMenu->sendMenuButtonToLogin('');
}
And replace it into:
NOTE: NEW FUNCTION ADDED
Code: Select all
function fufiMenu_newChallenge($aseco){
global $fufiMenu;
$fufiMenu->sendMenuButtonToLogin();
}
function fufiMenu_Off($aseco){
global $fufiMenu;
$fufiMenu->hideMenu();
}
Last but not least search for: //Line: 287
Code: Select all
/**
* Sends the default menu button to a specified login
*
* @param String $login
*/
function sendMenuButtonToLogin($login){
$header = str_replace(array('%menuid%', '%framepos%'), array($this->manialinkID.'0000', '0 0 1'), $this->blocks['header']);
$footer = $this->blocks['footer'];
$content = str_replace(array('%size%', '%pos%', '%poslabel%', '%style%', '%substyle%', '%action%', '%text%'), array($this->width.' '.$this->height, $this->posx.' '.$this->posy.' 1', ($this->posx+$this->width/2).' '.($this->posy-($this->height/2-0.1)).' 1', $this->styles['menubutton']['style'], $this->styles['menubutton']['substyle'], $this->manialinkID.'0000', $this->caption), $this->blocks['menubutton']);
$icon = str_replace(array('%x%', '%y%', '%style%', '%substyle%'), array($this->posx + 1, $this->posy-0.2, $this->styles['menuicon']['style'], $this->styles['menuicon']['substyle']), $this->blocks['icon']);
$xml = $header.$content.$icon.$footer;
if ($login == ''){
if ($this->firstChallenge){
$this->firstChallenge = false;
if ($this->Aseco->debug) $this->Aseco->console('[FufiMenu] sending menu button to all');
$this->Aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
}
} else {
if (!$this->firstChallenge){
if ($this->Aseco->debug) $this->Aseco->console('[FufiMenu] sending menu button to login: '.$login);
$this->Aseco->client->addCall('SendDisplayManialinkPageToLogin', array($login, $xml, 0, false));
}
}
}
And replace it into:
NOTE: NEW FUNCTION ADDED
Code: Select all
function hideMenu() {
$xml = '<manialink id="3830000"></manialink>';
$this->Aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
}
/**
* Sends the default menu button to a specified login
*
* @param String $login
*/
function sendMenuButtonToLogin(){
$header = str_replace(array('%menuid%', '%framepos%'), array($this->manialinkID.'0000', '0 0 1'), $this->blocks['header']);
$footer = $this->blocks['footer'];
$content = str_replace(array('%size%', '%pos%', '%poslabel%', '%style%', '%substyle%', '%action%', '%text%'), array($this->width.' '.$this->height, $this->posx.' '.$this->posy.' 1', ($this->posx+$this->width/2).' '.($this->posy-($this->height/2-0.1)).' 1', $this->styles['menubutton']['style'], $this->styles['menubutton']['substyle'], $this->manialinkID.'0000', $this->caption), $this->blocks['menubutton']);
$icon = str_replace(array('%x%', '%y%', '%style%', '%substyle%'), array($this->posx + 1, $this->posy-0.2, $this->styles['menuicon']['style'], $this->styles['menuicon']['substyle']), $this->blocks['icon']);
$xml = $header.$content.$icon.$footer;
$this->Aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
/*
if ($login == ''){
if ($this->firstChallenge){
$this->firstChallenge = false;
if ($this->Aseco->debug) $this->Aseco->console('[FufiMenu] sending menu button to all');
$this->Aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
}
} else {
if (!$this->firstChallenge){
if ($this->Aseco->debug) $this->Aseco->console('[FufiMenu] sending menu button to login: '.$login);
$this->Aseco->client->addCall('SendDisplayManialinkPageToLogin', array($login, $xml, 0, false));
}
}*/
}
Greetings