Vp event set

From Virtual Paradise Wiki
Revision as of 20:13, 29 July 2012 by Legion (talk | contribs) (+cat Category: SDK)
Jump to navigation Jump to search

<C>int vp_event_set(VPInstance instance, int eventname, void (*event)(VPInstance sender))</C>

Description

Sets a handler for a specific event.

Examples

<C>void avatar_add(VPInstance instance) {

   printf("%s enters.\n", vp_string(instance, VP_AVATAR_NAME));

}</C> <C>vp_event_set(instance, VP_EVENT_AVATAR_ADD, avatar_add);</C>