Xbox Live 프로필 카드 표시 함수 설명
이 문서에서는 Xbox Live에서 특정 사용자의 프로필 카드를 표시하는 함수인 xboxlive_show_profile_card_for_user
에 대해 설명합니다. 이 함수를 사용하면 요청한 사용자 ID와 타겟 사용자 ID를 기반으로 해당 사용자의 프로필 카드를 화면에 표시할 수 있습니다.
함수 구문
xboxlive_show_profile_card_for_user(requesting_user_id, target_user_id);
매개변수 설명
매개변수 이름 | 타입 | 설명 |
---|---|---|
requesting_user_id | 포인터 | 정보를 요청하는 사용자의 ID 포인터 |
target_user_id | 포인터 | 프로필 카드를 가져올 사용자의 ID 포인터 |
반환값
이 함수는 반환값이 없습니다. 프로필 카드가 화면에 표시됩니다.
사용 예제
아래의 코드는 게임패드의 버튼이 눌렸는지를 확인하고, 눌렸다면 지정된 사용자의 프로필 카드를 표시합니다.
if (gamepad(0, gp_start)) {
xboxlive_show_profile_card_for_user(user[0], user[1]);
}
활용 예제
- 게임 내 친구 프로필 보기
gml if (gamepad(0, gp_button_a)) { xboxlive_show_profile_card_for_user(current_user_id, friend_user_id); }
- 특정 이벤트 발생 시 프로필 카드 표시
gml if (event_type == EVENT_USER_INTERACTION) { xboxlive_show_profile_card_for_user(requesting_user_id, target_user_id); }
- 사용자 선택 메뉴에서 프로필 카드 표시
gml if (selected_user_index != -1) { xboxlive_show_profile_card_for_user(current_user_id, users[selected_user_index]); }
- 게임 종료 후 프로필 카드 확인
gml if (game_ended) { xboxlive_show_profile_card_for_user(user[0], user[1]); }
이와 같이 xboxlive_show_profile_card_for_user
함수를 활용하여 다양한 상황에서 사용자의 프로필 카드를 표시할 수 있습니다.