diff --git a/docs/lua/infraction.md b/docs/lua/infraction.md index 597a3db5..cfecd54a 100644 --- a/docs/lua/infraction.md +++ b/docs/lua/infraction.md @@ -7,8 +7,9 @@ All the infraction from the menu are listed below, used as parameter for adding network.flag_player_as_modder(player_index, infraction.CUSTOM_REASON, "My custom reason on why the player is flagged as a modder") ``` -## Infraction Count: 12 +## Infraction Count: 13 +### `DESYNC_PROTECTION` ### `TRIGGERED_ANTICHEAT` ### `TRIED_CRASH_PLAYER` ### `TRIED_KICK_PLAYER` diff --git a/docs/lua/tables/network.md b/docs/lua/tables/network.md index ff2703fc..3c3e8334 100644 --- a/docs/lua/tables/network.md +++ b/docs/lua/tables/network.md @@ -2,7 +2,7 @@ Table containing helper functions for network related features. -## Functions (13) +## Functions (15) ### `trigger_script_event(bitset, _args)` @@ -170,4 +170,28 @@ Sends a chat message to the specified player. Other players would not be able to network.send_chat_message_to_player(player_idx, msg) ``` +### `get_player_rank(pid)` + +Call get_player_rank(playerID) + +- **Parameters:** + - `pid` (int) + +**Example Usage:** +```lua +network.get_player_rank(pid) +``` + +### `get_player_rp(pid)` + +Call get_player_rp(playerID) + +- **Parameters:** + - `pid` (int) + +**Example Usage:** +```lua +network.get_player_rp(pid) +``` + diff --git a/src/lua/bindings/network.cpp b/src/lua/bindings/network.cpp index c786b106..721859a0 100644 --- a/src/lua/bindings/network.cpp +++ b/src/lua/bindings/network.cpp @@ -1,15 +1,17 @@ #include "network.hpp" #include "../../script.hpp" +#include "core/scr_globals.hpp" #include "hooking/hooking.hpp" #include "pointers.hpp" #include "services/player_database/player_database_service.hpp" -#include "util/notify.hpp" #include "util/chat.hpp" +#include "util/notify.hpp" #include "util/scripts.hpp" #include "util/session.hpp" #include "util/system.hpp" #include "util/teleport.hpp" +#include