This function will return the User ID pointer associated with the given gamepad index value, or pointer_null if no user is associated with it. Note that this function should only be used with gamepad indices, and not with xboxlive_get_user_count().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.
Argument Description pad_index The index (an integer) of the gamepad slot to check
for(var i = 0; i < 11; ++i;)
var u_id = xboxlive_user_for_pad(i);
if u_id != pointer_null
pad_name[i] = xboxlive_gamedisplayname_for_user(u_id);
pad_name[i] = "Press Play";
The above code loops through all available pad slots and checks to see if there is a user ID pointer associated with it. If there is, an array is set with the user display name, otherwise the array is set to some default text.