fix(JoinMessage): Fixed join player message to be more efficient
This commit is contained in:
parent
4f0cfcba75
commit
6b06ed9133
@ -3,22 +3,18 @@
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::join_message()
|
||||
void features::join_message(Player player)
|
||||
{
|
||||
bool bJoinMessage = g_settings.options["join_message"].get<bool>();
|
||||
|
||||
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, "<C>");
|
||||
strcat(joinMsg, g_pointers->m_get_player_name(i));
|
||||
strcat(joinMsg, g_pointers->m_get_player_name(player));
|
||||
strcat(joinMsg, "</C> is joining.");
|
||||
|
||||
features::notify::above_map(joinMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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];
|
||||
|
Reference in New Issue
Block a user