
I have tried to use this snippet :
Code: Select all
Aseco::registerEvent('onEndRace', 'forceModEndRace');
function forceModEndRace($aseco, $command){
$modsStadium = array(
'http://www.fileden.com/45645645645/StadiumLoadENG.zip'
);
$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));
}
I put the code in the idlekick plugin, i guessed it is used in the EndRace... I thought i got this to work for a while, but after some rounds i decided to put it in it´s own pluignfile to be more scalable and be used in several servers. It didnt work... so i put it back into idlekick.plugin but it wont work...
Any suggestions...?!