Difference between revisions of "Bz localTime"

From BZFlagWiki
Jump to: navigation, search
(Added bz_localTime structure for BZFS API)
 
m (Update)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
==Overview==
 
==Overview==
  
bz_localTime is a structure for the local time of the (server?).<br>
+
bz_localTime is a structure for the local time of the server.<br>
 
To fill the new structure bz_localTime, see [[bz_getLocaltime]]
 
To fill the new structure bz_localTime, see [[bz_getLocaltime]]
 +
 +
==Version Changes==
 +
 +
In BZFlag 3.0, bz_localTime has been changed to [[bz_Time]].
  
 
==Values==
 
==Values==
Line 26: Line 30:
 
   [[bz_localTime]] st; // create new object<br>
 
   [[bz_localTime]] st; // create new object<br>
 
   [[bz_getLocaltime]](&st); // fill st with values<br>
 
   [[bz_getLocaltime]](&st); // fill st with values<br>
   [[bz_sendTestMessagef]](BZ_SERVER,playerID,"The time is %i:%i.",st.hour,st.minute); // print [hour]:[minute] to player<br>
+
   [[bz_sendTextMessagef]](BZ_SERVER,playerID,"The time is %i:%i.",st.hour,st.minute); // print [hour]:[minute] to player<br>
  
 
}
 
}

Latest revision as of 23:52, 10 February 2009

BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.


Overview[edit]

bz_localTime is a structure for the local time of the server.
To fill the new structure bz_localTime, see bz_getLocaltime

Version Changes[edit]

In BZFlag 3.0, bz_localTime has been changed to bz_Time.

Values[edit]

bz_localTime{

 int year;
 int month;
 int day;
 int hour;
 int minute;
 int second;
 bool daylightSavings;

}

Examples[edit]

void writeTime(int playerID){

 bz_localTime st; // create new object
bz_getLocaltime(&st); // fill st with values
bz_sendTextMessagef(BZ_SERVER,playerID,"The time is %i:%i.",st.hour,st.minute); // print [hour]:[minute] to player

}