All you scripters out there
Posted: Mon Oct 24, 2005 11:02 am
Here is the current maproatation script that is on the server.
Fix it so the maps rotate, as it is right now it stays on the same map forever.
Thanks
Code: Select all
namespace mapcycle {
void cycle() {
string si_map = sys.getcvar("si_map");
float replay_count = sys.getPersistantFloat("replay_count");
if (replay_count <= 0) {
replay_count = 1;
}
replay_count--;
if ( replay_count <= 0 ) {
if ( si_map == "mp/q4dm8") {
sys.setcvar( "si_gameType", "DM" );
sys.setcvar( "si_map", "mp/q4dm8");
}
}
sys.setPersistantArg( "replay_count", replay_count );
}
}
Thanks