Page 1 of 1

Loading Screen Server

PostPosted: 02.01.2011, 14:54
by Housekeepr
Hi all,

I was wondering, on some servers (RPG and normal) they have a forced "Loading Screen"(or multiple) with their own advertisements... Instead of looking at a TM loading Screen or the loading screen which is included with the mod running on the upcoming map.

Trough what way or how... can you overrule that?
Without loosing the original mod on the track. or what so ever could happen.

Gr. House ^^

PostPosted: 02.01.2011, 16:48
by Mario
u must edit the mod and put ure screen at the place of the old loadscreen, than upload the .zip folder and make a locator again i think

PostPosted: 02.01.2011, 17:04
by Lambda
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]

PostPosted: 03.01.2011, 09:39
by Housekeepr
Thnx we will test it :)