Aha ok. Didn't know that.
For that fiveminutes problem, I think the problem is in this script;
Code: Select all
main()
{
  thread time();
}
time()
{
   if (!isDefined(level.timelimit_custom))
   {
      level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
      level.realtime_custom = getTime();
      
   }
      
      while (timeleft() > 301)
            wait 1;
       players = getentarray("player","classname");
   for(i=0;i<players.size;i++)
      players[i] playlocalsound("fiveminutes");
   
   wait 1;
   level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
   //thread time();   //unlock this string if you want to let the script print it again if some admin changed (extended) timelimit after the printing
}
timeLeft()
{
   if (level.timelimit_custom != getCvarFloat("scr_dm_timelimit"))
   {
      level.timelimit_custom = getCvarFloat("scr_dm_timelimit");
      level.realtime_custom = getTime();
   }
   
   realtime = (getTime()-level.realtime_custom)/1000;
      timeleft = getCvarFloat("scr_dm_timelimit")*60 - realtime;
   if (timeleft < 301) timeleft = 1000;   //if timelimit is less than 5 minutes, do not let the script print anything to players
      return timeleft;
}
To recap; 
- The sounds plays the first time the map is played but when I restart the map it doesn't play anymore, after I totaly shut down CoD2, restart the game and play the map it works again.
Shouldn't "return timeleft;" be "return time;" ?
Or should I unlock the "thread time();" string ?