This wiki is archived and useful information is being migrated to the main bzflag.org website
Difference between revisions of "Register"
From BZFlagWiki
(Add Register() API Function page. Include an example.) |
m (Reverted edits by 82.198.1.1 (talk) to last revision by Sigonasr2) |
||
(3 intermediate revisions by 2 users not shown) | |||
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 |
Latest revision as of 18:49, 12 February 2012
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[edit]
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.