vp_join
Method call snippet
vp_join(instance, user_id);
Send a join request to a user.
Parameters
These are the parameters that this method requires:
Parameter | Usage |
---|---|
VPInstance instance |
Pointer to the instance this method call is intended for |
int user_id |
User id |
Returns
This method returns a return code integer, which indicates whether the call was successful or errored for any reason:
Return code | Cause |
---|---|
VP_RC_SUCCESS |
Successful call (for methods that have a registered callback, it only means the request has been sent) |
VP_RC_NOT_IN_UNIVERSE |
Bot is not currently in the universe |
VP_RC_JOIN_DECLINED |
Join request was declined |
VP_RC_TIMEOUT |
Join request timeout (no accept/decline within 30 seconds) |
The following attributes will be returned in VP_CALLBACK_JOIN
if the operation was successful:
Attribute | Usage | Also returned for |
---|---|---|
VP_JOIN_ID | Join id | VP_RC_JOIN_DECLINED
|
VP_USER_ID | User id | VP_RC_JOIN_DECLINED
|
VP_JOIN_NAME | Name of user | VP_RC_JOIN_DECLINED and VP_RC_TIMEOUT
|
VP_JOIN_X | User x coordinate | |
VP_JOIN_Y | User y coordinate | |
VP_JOIN_Z | User z coordinate | |
VP_JOIN_YAW | User yaw angle | |
VP_JOIN_PITCH | User pitch angle | |
VP_JOIN_WORLD | World that user is in |
Behavior
- Upon sending a request,
VP_EVENT_JOIN
is triggered for the user. Seevp_event_set()
.
Examples
...