Well... is it? Hmmm... strange.
Script.Round : Fetch Score + Alter live modescript_settings
Re: Script.Round : Fetch Score + Alter live modescript_settings
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Re: Script.Round : Fetch Score + Alter live modescript_settings


System Specs:
OS: Windows 7 Professionnal x64
CPU: Intel Core i7-6700K / 4 GHz - 8 MB cache
GPU: MSI GTX 980TI GAMING 6G - OC Edition
Motherboard: ASUS MAXIMUS VIII RANGER
RAM : 32Gb Kingston HyperX Savage - DDR4
DirectX 11
OS: Windows 7 Professionnal x64
CPU: Intel Core i7-6700K / 4 GHz - 8 MB cache
GPU: MSI GTX 980TI GAMING 6G - OC Edition
Motherboard: ASUS MAXIMUS VIII RANGER
RAM : 32Gb Kingston HyperX Savage - DDR4
DirectX 11
Re: Script.Round : Fetch Score + Alter live modescript_settings
Doesn't explain why this little manialink takes 4 seconds to show up, when this one (or other of this kind) always comes instantly :Miss wrote: ↑20 Jan 2020, 22:33 Well, Uaseco in itself is pretty slow. But another thing is, if you're sending a manialink to every player at the same time, that might take some time. (Definitely not 3 seconds though..)
It might be faster to display such a text clientside using Maniascript instead of sending the entire manialink.
Code: Select all
$xml = '<manialink id="3121120001">';
$xml .= '<frame posn="-160 63 0">';
$xml .= '<label posn="13 9 2" sizen="60 4" scale ="0.5" valign="center" halign="left" style="TextRaceMessageBig" substyle="" text="Teams Rankings"/>';
$xml .= '<quad posn="0 4.5 2" sizen="58 1" style="Icons128x32_1" substyle="SlideBar"/>';
$i = 0;
$posap = 1;
foreach($za_teampts as $logt => $pts) {
if (isset($aseco->server->players->player_list[$logt])) $nickt = $aseco->server->players->player_list[$logt]->nickname;
else $nickt = $logt;
// algo évolution des positions des teams entre les 2 rounds (pour générer la flèche verte ou rouge)
$posav = 1;
foreach ($za_teamcompar as $teamav => $ptsav) {
if ($teamav === $logt) {
$diff = $posap - $posav;
if ($diff > 0) {
$substyle = "DownWrong";
} elseif ($diff < 0) {
$substyle = "UpGood";
} else {
$substyle = "";
}
break;
}
$posav++;
}
$posap++;
//////////////////////////////////////////////////////////////////////////////////////////////////////
$posv = -$i * 5.5;
$xml .= '<label posn="1 '.($posv).' 1" sizen="4 0.6" scale="0.55" valign="center" halign="left" text="('.$za_teamnbjou[$logt].')"/>';
$xml .= '<label posn="6.5 '.($posv-0.16).' 1" sizen="5 1" scale="0.65" valign="center" halign="center" style="TextTitle3" substyle="" text="'.($i + 1).'."/>';
$xml .= '<label posn="9 '.($posv).' 1" sizen="40 1" scale="0.8" valign="center" halign="left" style="TextTitle3" substyle="" text="'.$nickt.'"/>';
$xml .= '<label posn="49.5 '.($posv-0.12).' 1" sizen="56 0.6" scale="0.68" valign="center" halign="center" style="TextTitle3" substyle="" text="'.$pts.' Pts"/>';
$xml .= '<quad posn="56.6 '.($posv-0.14).' 1" sizen="7 7" scale="0.57" valign="center" halign="left" style="Copilot" substyle="'.$substyle.'"/>';
$i++;
$substyle = "";
}
$xml .= '<quad posn="0 '.($posv * 1.087).' 2" sizen="58 1" style="Icons128x32_1" substyle="SlideBar"/>';
$xml .= '</frame>';
$xml .= '</manialink>';
Well now I'm reporting this, I see that I use, for the one causing problem : $aseco->client->query("SendDisplayManialinkPage", $xml, 10000, false)
And for the one in this post : $aseco->sendManialink($xml, false, 0, false);
Any significative difference between the 2 methods ?
Re: Script.Round : Fetch Score + Alter live modescript_settings
$aseco->sendManialink() uses also $aseco->client->query("SendDisplayManialinkPage", $xml, $timeout, $hideclick) to send the manialink to all players, so that couldn't be the problem. But it's better to use $aseco->sendManialink() instead of the methods directly, because the methods could be changed.Palteza wrote: ↑21 Jan 2020, 18:22 Well now I'm reporting this, I see that I use, for the one causing problem : $aseco->client->query("SendDisplayManialinkPage", $xml, 10000, false)
And for the one in this post : $aseco->sendManialink($xml, false, 0, false);
Any significative difference between the 2 methods ?
If you want, you could PM me your plugin and I'll take a deeper look into the whole code.
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Visit the official website for more: UASECO.org
Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name
You like what I do? Then award a ManiaStar.
Who is online
Users browsing this forum: No registered users and 1 guest