diff --git a/BigBaseV2/src/features/join_message.cpp b/BigBaseV2/src/features/join_message.cpp index 60cda14e..e8287eaf 100644 --- a/BigBaseV2/src/features/join_message.cpp +++ b/BigBaseV2/src/features/join_message.cpp @@ -3,22 +3,18 @@ namespace big { - void features::join_message() + void features::join_message(Player player) { bool bJoinMessage = g_settings.options["join_message"].get(); if (bJoinMessage) { - for (int i = 0; i < 32; i++) { - if (!NETWORK::NETWORK_IS_PLAYER_CONNECTED(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(i)) && ENTITY::DOES_ENTITY_EXIST(PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(i))) { - char joinMsg[64]; - strcpy(joinMsg, ""); - strcat(joinMsg, g_pointers->m_get_player_name(i)); - strcat(joinMsg, " is joining."); + char joinMsg[64]; + strcpy(joinMsg, ""); + strcat(joinMsg, g_pointers->m_get_player_name(player)); + strcat(joinMsg, " is joining."); - features::notify::above_map(joinMsg); - } - } + features::notify::above_map(joinMsg); } } } \ No newline at end of file diff --git a/BigBaseV2/src/features/update_player_structs.cpp b/BigBaseV2/src/features/update_player_structs.cpp index c513e83e..9b7ff6df 100644 --- a/BigBaseV2/src/features/update_player_structs.cpp +++ b/BigBaseV2/src/features/update_player_structs.cpp @@ -10,6 +10,8 @@ namespace big { if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i)) { + if (!g_players[i].is_online) features::join_message((Player)i); + g_players[i].is_online = true; int iNetworkHandle[26];