I found once this code on TM-Forum -
you can read here - I never checked if is OK, probably works:
[php]<?php
Aseco::registerEvent('onEndRace', 'forceModEndRace');
function forceModEndRace($aseco, $command){
$modsStadium = array(
//'http://PATH TO YOUR DIRECT LINK .ZIP FILE' add more
'http://PATH TO YOUR DIRECT LINK .ZIP FILE'
);
$modsIsland = array(
'http://www.fileden.com/45645645645/IslandLoadENG.zip'
);
$modsSpeed = array(
'http://www.fileden.com/45645645645/SpeedLoadENG.zip'
);
$modsRally = array(
'http://www.fileden.com/45645645645/RallyLoadENG.zip'
);
$modsBay = array(
'http://www.fileden.com/45645645645/BayLoadENG.zip'
);
$modsCoast = array(
'http://www.fileden.com/45645645645/CoastLoadENG.zip'
);
$modsAlpine = array(
'http://www.fileden.com/45645645645/AlpineLoadENG.zip'
);
$idxStadium = rand(0, count($modsStadium)-1);
$idxIsland = rand(0, count($modsIsland)-1);
$idxSpeed = rand(0, count($modsSpeed)-1);
$idxRally = rand(0, count($modsRally)-1);
$idxBay = rand(0, count($modsBay)-1);
$idxCoast = rand(0, count($modsCoast)-1);
$idxAlpine = rand(0, count($modsAlpine)-1);
$modCalls = array(
array('Env'=>'Stadium', 'Url'=>$modsStadium[$idxStadium]),
array('Env'=>'Island', 'Url'=>$modsIsland[$idxIsland]),
array('Env'=>'Speed', 'Url'=>$modsSpeed[$idxSpeed]),
array('Env'=>'Rally', 'Url'=>$modsRally[$idxRally]),
array('Env'=>'Bay', 'Url'=>$modsBay[$idxBay]),
array('Env'=>'Coast', 'Url'=>$modsCoast[$idxCoast]),
array('Env'=>'Alpine', 'Url'=>$modsAlpine[$idxAlpine])
);
$aseco->addCall('SetForcedMods', array(True, $modCalls));
}
?>[/php]
In .zip file should be just an loadscreen image.
Try it.
And this one is for Stadium environment -
here[php]<?php
Aseco::registerEvent('onSync', 'modSet');
Aseco::registerEvent('onEndRace', 'modSet');
function modSet($aseco) {
$modurl = array(
'http://PATH TO YOUR DIRECT LINK .ZIP FILE',
'http://PATH TO YOUR DIRECT LINK .ZIP FILE'
// add more
);
$array[] = array('Env' => 'Stadium', 'Url' => $modurl[mt_rand(0, count($modurl) - 1)]);
$aseco->client->query('SetForcedMods', true, $array);
}
?>[/php]