Hey Rivals
This is Little Function i have Made to Extend Player List Show
1.Shows Players
2.Say If player is Host
3.Say If Player Is Host and Friend
4.Determines your Player
5.Determines your Player and if you host
if you have any ideas to add to this let me know !
[HIDE]Is player Friend Function
bool Is_Player_Friend(Player player) { bool BplayerFriend = false; bool bplayerFriend = false; int handle[76]; NETWORK::NETWORK_HANDLE_FROM_PLAYER(player, &handle[0], 13); if (NETWORK::NETWORK_IS_HANDLE_VALID(&handle[0], 13)) { BplayerFriend = NETWORK::NETWORK_IS_FRIEND(&handle[0]); } if (BplayerFriend) bplayerFriend = true; else bplayerFriend = false; return bplayerFriend; }
Client List Function
#pragma region Players List case Players_List: addTitle("Players List"); for (int i = 0; i < 18; i++) { char * Name = PLAYER::GET_PLAYER_NAME(i); char NameBuffer[30]; //if host and Friend if (i == NETWORK::NETWORK_GET_HOST_OF_SCRIPT("freemode", -1, 0) && Is_Player_Friend(i) == true) { sprintf(NameBuffer, "~b~[HOST/FRIEND] %s", Name); Name = NameBuffer; addOption(Name); } //if friend else if (Is_Player_Friend(i) == true) { sprintf(NameBuffer, "~g~[FRIEND] %s", Name); Name = NameBuffer; addOption(Name); } //if host and you else if (i == NETWORK::NETWORK_GET_HOST_OF_SCRIPT("freemode", -1, 0) && PLAYER::GET_PLAYER_PED(i) == PLAYER::PLAYER_PED_ID()) { sprintf(NameBuffer, "~h~~o~รท[HOST] %s", Name); Name = NameBuffer; addOption(Name); } //if host only else if (i == NETWORK::NETWORK_GET_HOST_OF_SCRIPT("freemode", -1, 0)) { sprintf(NameBuffer, "~r~[HOST] %s", Name); Name = NameBuffer; addOption(Name); } //if you only else if (PLAYER::GET_PLAYER_PED(i) == PLAYER::PLAYER_PED_ID()) { sprintf(NameBuffer, "~h~~o~รท %s", Name); Name = NameBuffer; addOption(Name); } // all other xD else { addOption(Name); } } if (optionPress && PLAYER::IS_PLAYER_PLAYING(currentOption - 1)) { selectedPlayer = currentOption - 1; changeSubmenu(Player_Options); } break; #pragma endregion
[/HIDE]