Vp event set

From Virtual Paradise Wiki
Revision as of 08:10, 7 February 2008 by Edwin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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>