plugins/include/timers.inc
changeset 1462 c5feb60740cf
parent 1459 8132c2259758
child 1947 e73a1e51833b
     1.1 --- a/plugins/include/timers.inc	Sun Sep 23 19:35:22 2007 +0000
     1.2 +++ b/plugins/include/timers.inc	Sun Sep 23 20:11:48 2007 +0000
     1.3 @@ -121,7 +121,9 @@
     1.4  native Float:GetTickedTime();
     1.5  
     1.6  /**
     1.7 - * Returns an estimate of the time left before the map ends.
     1.8 + * Returns an estimate of the time left before the map ends.  If the server 
     1.9 + * has not processed any frames yet (i.e. no players have joined the map yet), 
    1.10 + * then the time left returned will always be infinite.
    1.11   *
    1.12   * @param timeleft			Variable to store the time, in seconds.  If the 
    1.13   *							value is less than 0, the time limit is infinite.
    1.14 @@ -130,7 +132,9 @@
    1.15  native bool:GetMapTimeLeft(&timeleft);
    1.16  
    1.17  /**
    1.18 - * Retrieves the current map time limit.
    1.19 + * Retrieves the current map time limit.  If the server has not processed any 
    1.20 + * frames yet (i.e. no players have joined the map yet), then the time limit 
    1.21 + * returned will always be 0.
    1.22   *
    1.23   * @param time				Set to the number of total seconds in the map time 
    1.24   *							limit, or 0 if there is no time limit set.
    1.25 @@ -149,7 +153,7 @@
    1.26  native bool:ExtendMapTimeLimit(time);
    1.27  
    1.28  /**
    1.29 - * Notification that the map's time left has changed  via a change in the time 
    1.30 + * Notification that the map's time left has changed via a change in the time 
    1.31   * limit or a change in the game rules (such as mp_restartgame).  This is useful 
    1.32   * for plugins trying to create timers based on the time left in the map.
    1.33   *
    1.34 @@ -157,6 +161,10 @@
    1.35   * cause infinite recursion.
    1.36   *
    1.37   * If the operation is not supported, this will never be called.
    1.38 +
    1.39 + * If the server has not yet processed any frames (i.e. no players have joined 
    1.40 + * the map yet), then this will be called once the server begins ticking, even 
    1.41 + * if there is no time limit set.
    1.42   */
    1.43  forward OnMapTimeLeftChanged();
    1.44  
    1.45 @@ -188,3 +196,4 @@
    1.46  	flags |= TIMER_HNDL_CLOSE;
    1.47  	return CreateTimer(interval, func, data, flags);
    1.48  }
    1.49 +