xboxlive_get_user


描述

With this function you can retrieve the user ID pointer for the indexed user. If the user does not exist, the function will return the constant pointer_null instead. You can find the number of users currently logged in with the function xboxlive_get_user_count().

IMPORTANT: This function should only be used with xboxlive_get_user_count() - do not use this with gamepads. Use xboxlive_user_for_pad instead.
IMPORTANT! This function is only valid when exporting using the UWP target for the Xbox One and it requires you to have checked the Enable XBox Live option in the UWP Game Options.


语法:

xboxlive_get_user(index);

参数 描述
index The index (an integer) to get the User ID from.


返回:

指针


例如:

for(var i = 0; i < xboxlive_get_user_count(); ++i;)
    {
    user_id[i] = xboxlive_get_user(i);
    }

The above loops through all the signed in users and stores their unique ID pointer in an array.