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.

Register: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
Sigonasr2 (talk | contribs)
Add Register() API Function page. Include an example.
 
Sigonasr2 (talk | contribs)
Added return value.
Line 1: Line 1:
{{apicall
{{apicall
| name        = Register()
| name        = Register()
| returns    = Whether or not the register was successful.
| returntype  = bool
| description = Registers a new event handler. This event handler will receive events of the event type specified.
| description = Registers a new event handler. This event handler will receive events of the event type specified.
| param1      = eventType
| param1      = eventType

Revision as of 05:51, 19 October 2011

bool Register() (bz_eEventType eventType)


Registers a new event handler. This event handler will receive events of the event type specified.

Parameters:
eventType  -  The type of event to listen for
Returns:
Whether or not the register was successful.


Example

void SAMPLE_PLUGIN::Init ( const char* /*commandLine*/ )
{
	Register(bz_ePlayerUpdateEvent);
}

More information on this function can be found on the BZFS_API_2.4_Upgrade page.