Skip to content

Instantly share code, notes, and snippets.

@arctic5
Last active December 22, 2015 13:58
Show Gist options
  • Save arctic5/6482459 to your computer and use it in GitHub Desktop.
Save arctic5/6482459 to your computer and use it in GitHub Desktop.
my idea on doing custom map times
//goes in game_init
global.ctftimelimit = max(1, min(255, ini_read_real("Server", " Ctf Time Limit", 2)));
global.cptimelimit = max(1, min(255, ini_read_real("Server", " Cp Time Limit", 3)));
global.gentimelimit = max(1, min(255, ini_read_real("Server", " Gen Time Limit", 4)));
global.arenatimelimit = max(1, min(255, ini_read_real("Server", " Arena Time Limit", 5)));
ini_write_real("Server", "Ctf Time Limit", global.ctftimelimit);
ini_write_real("Server", "Cp Time Limit", global.cptimelimit);
ini_write_real("Server", "Gen Time Limit", global.gentimelimit);
ini_write_real("Server", "Arena Time Limit", global.arenatimelimit);
//goes in line 30 of basicroomsetup
if instance_exists(IntelligenceBaseBlue) || instance_exists(IntelligenceBaseRed) || instance_exists(IntelligenceRed) || instance_exists(IntelligenceBlue)
global.timeLimitMins = global.ctftimelimit;
else if instance_exists(GeneratorBlue) || instance_exists(GeneratorRed) {
global.timeLimitMins = global.gentimelimit;
}
else if instance_exists(ArenaControlPoint) {
global.timeLimitMins = global.arenatimelimit;
}
else if instance_exists(ControlPoint) {
global.timeLimitMins = global.cptimelimit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment