mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-16 06:18:05 +08:00
fix(PlayerJoining): Fixed player joining
This commit is contained in:
parent
aff9e6a889
commit
6a8b21d8a6
@ -68,6 +68,16 @@ namespace big
|
||||
STATS::STAT_GET_INT(RAGE_JOAAT("MPPLY_LAST_MP_CHAR"), statSlot, true);
|
||||
}
|
||||
|
||||
void func::join_message(Player player)
|
||||
{
|
||||
if (!g_settings.options["join_message"]) return;
|
||||
|
||||
char join_msg[64];
|
||||
sprintf(join_msg, "<C>%s</C> is joining...", g_pointers->m_get_player_name(player));
|
||||
|
||||
notify::above_map(join_msg);
|
||||
}
|
||||
|
||||
void func::join_session_type(session_type session)
|
||||
{
|
||||
if (session.id == -1)
|
||||
|
@ -14,6 +14,7 @@ namespace big
|
||||
static void delete_entity(Entity ent);
|
||||
static double distance_between_vectors(Vector3 a, Vector3 b);
|
||||
static void get_active_character_slot(int* statSlot);
|
||||
static void join_message(Player player);
|
||||
static void join_session_type(session_type session);
|
||||
static bool raycast_entity(Entity* ent);
|
||||
static void reset_vehicle_sell_stats();
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include "features/functions.hpp"
|
||||
#include "features/sys.hpp"
|
||||
#include <algorithm>
|
||||
#include "fiber_pool.hpp"
|
||||
@ -13,7 +14,8 @@ namespace big
|
||||
{
|
||||
if (NETWORK::NETWORK_IS_PLAYER_CONNECTED(i))
|
||||
{
|
||||
// if (!g_players[i].is_online) features::join_message((Player)i);
|
||||
bool exists = g_players.find(i) != g_players.end();
|
||||
if (!exists || (exists && !g_players.at(i).is_online)) func::join_message((Player)i);
|
||||
|
||||
players[i].id = i;
|
||||
players[i].is_online = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user