This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Bz getUTCtime: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
Sigonasr2 (talk | contribs)
Add API Event page with example.
 
(No difference)

Latest revision as of 05:27, 19 October 2011

void bz_getUTCtime (bz_Time *ts)


Fills a bz_Time object with values for the Universal Time Coordinated (UTC) time.

Parameters:
*ts  -  bz_Time object to fill.

Example

Get the UTC time and display it to the user upon joining.

case bz_ePlayerJoinEvent: {
	bz_Time currentTime;
	bz_getUTCtime(&currentTime);
	bz_sendTextMessagef(BZ_SERVER,((bz_PlayerJoinPartEventData_V1*)eventData)->playerID,"Welcome! The current date is %d/%d/%d at %d:%d:%d.",currentTime.month,currentTime.day,currentTime.year,currentTime.hour,currentTime.minute,currentTime.second);
}break;