mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 08:00:56 -04:00
[Server] Add GetCurrentMpNum() and SetCurrentMpNum() script functions
This commit is contained in:
parent
8b8c01f389
commit
2716078a30
@ -11,6 +11,16 @@ unsigned int MiscellaneousFunctions::GetLastPlayerId() noexcept
|
|||||||
return Players::getLastPlayerId();
|
return Players::getLastPlayerId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MiscellaneousFunctions::GetCurrentMpNum() noexcept
|
||||||
|
{
|
||||||
|
return mwmp::Networking::getPtr()->getCurrentMpNum();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MiscellaneousFunctions::SetCurrentMpNum(int mpNum) noexcept
|
||||||
|
{
|
||||||
|
mwmp::Networking::getPtr()->setCurrentMpNum(mpNum);
|
||||||
|
}
|
||||||
|
|
||||||
void MiscellaneousFunctions::LogMessage(unsigned short level, const char *message) noexcept
|
void MiscellaneousFunctions::LogMessage(unsigned short level, const char *message) noexcept
|
||||||
{
|
{
|
||||||
LOG_MESSAGE_SIMPLE(level, "[Script]: %s", message);
|
LOG_MESSAGE_SIMPLE(level, "[Script]: %s", message);
|
||||||
|
@ -6,6 +6,9 @@
|
|||||||
#define MISCELLANEOUSAPI \
|
#define MISCELLANEOUSAPI \
|
||||||
{"GetLastPlayerId", MiscellaneousFunctions::GetLastPlayerId},\
|
{"GetLastPlayerId", MiscellaneousFunctions::GetLastPlayerId},\
|
||||||
\
|
\
|
||||||
|
{"GetCurrentMpNum", MiscellaneousFunctions::GetCurrentMpNum},\
|
||||||
|
{"SetCurrentMpNum", MiscellaneousFunctions::SetCurrentMpNum},\
|
||||||
|
|
|
||||||
{"LogMessage", MiscellaneousFunctions::LogMessage},\
|
{"LogMessage", MiscellaneousFunctions::LogMessage},\
|
||||||
{"LogAppend", MiscellaneousFunctions::LogAppend}
|
{"LogAppend", MiscellaneousFunctions::LogAppend}
|
||||||
|
|
||||||
@ -14,6 +17,9 @@ class MiscellaneousFunctions
|
|||||||
public:
|
public:
|
||||||
static unsigned int GetLastPlayerId() noexcept;
|
static unsigned int GetLastPlayerId() noexcept;
|
||||||
|
|
||||||
|
static int GetCurrentMpNum() noexcept;
|
||||||
|
static void SetCurrentMpNum(int mpNum) noexcept;
|
||||||
|
|
||||||
static void LogMessage(unsigned short level, const char *message) noexcept;
|
static void LogMessage(unsigned short level, const char *message) noexcept;
|
||||||
static void LogAppend(unsigned short level, const char *message) noexcept;
|
static void LogAppend(unsigned short level, const char *message) noexcept;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user