void main()
{
float limit1 = 4000; //TIME LIMIT TO CHECK IF THERE'S A CONTDOWN RUNNING
float limit2 = 39800; //USED ONLY WHEN THE UNLIMITED GAME TIME IS ACTIVATED
float add = 3960; //TIME TO BE ADDED IF ALL PLAYERS ARE DEAD BUT HAS CREDITS TO USE
//CONTINUE SCREEN IS BEING SHOWN??
if(getglobalvar("activeText") == "Continue"){
if(openborvariant("count_players") > 0){ //PLAYERS ARE IN THE SCREEN??
setglobalvar("activeText", 0); //DISABLE CONTINUE COUNTER
}
}
//CONTINUE SCREEN IS NOT BEING SHOWN??
if(getglobalvar("activeText") != "Continue"){
if( !getplayerproperty(0, "joining") &&
!getplayerproperty(1, "joining") &&
!getplayerproperty(2, "joining") &&
!getplayerproperty(3, "joining") ){
if(openborvariant("count_players") <= 0){ //NO PLAYERS IN THE SCREEN??
if(getplayerproperty(0, "credits") > 0){ //ALREADY HAVE CREDITS TO PLAY??
if(openborvariant("game_time") < limit1){ //CONTINUE COUNTER IS LESS THAN 10 SECONDS??
changeopenborvariant("game_time", add); //CHANGE CONTINUE TIMER TO 10 SECONDS
setglobalvar("activeText", "Continue"); //ENABLE CONTINUE COUNTER
}
}
}
}
//GAME TIMER IS DISABLED?? MAINTAIN THE TIMER ALWAYS AT 99 SECONDS
if(getglobalvar("gameTimer") == "off"){
if(openborvariant("current_set") != 1){ //AVOID SURVIVAL MODE
if(openborvariant("count_players") > 0){ //PLAYERS ARE IN THE SCREEN??
if(openborvariant("game_time") < limit2){ //CONTINUE COUNTER IS LESS THAN 99 SECONDS??
changeopenborvariant("game_time", limit2); //CHANGE CONTINUE TIMER TO 99 SECONDS AGAIN
}
}
}
}
}
}