This wiki is archived and useful information is being migrated to the main bzflag.org website
Difference between revisions of "Bz localTime"
From BZFlagWiki
(Added bz_localTime structure for BZFS API) |
(Typo, bz_sendTestMessagef -> bz_sendTextMessagef) |
||
Line 26: | Line 26: | ||
[[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_sendTextMessagef]](BZ_SERVER,playerID,"The time is %i:%i.",st.hour,st.minute); // print [hour]:[minute] to player<br> |
} | } |
Revision as of 21:06, 30 December 2008
BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server. |
Overview
bz_localTime is a structure for the local time of the (server?).
To fill the new structure bz_localTime, see bz_getLocaltime
Values
bz_localTime{
int year; int month; int day; int hour; int minute; int second; bool daylightSavings;
}
Examples
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
}