diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index e4cd94c8..9aad0a66 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -1766,6 +1766,11 @@ unsigned int CPlayer::GetLanguageId() return m_LangId; } +void CPlayer::SetLanguageId(unsigned int id) +{ + m_LangId = id; +} + int CPlayer::GetUserId() { if (m_UserId == -1) diff --git a/core/PlayerManager.h b/core/PlayerManager.h index 452cf559..ce31287c 100644 --- a/core/PlayerManager.h +++ b/core/PlayerManager.h @@ -82,6 +82,7 @@ public: bool IsInKickQueue(); IPlayerInfo *GetPlayerInfo(); unsigned int GetLanguageId(); + void SetLanguageId(unsigned int id); int GetUserId(); bool RunAdminCacheChecks(); void NotifyPostAdminChecks(); diff --git a/core/smn_lang.cpp b/core/smn_lang.cpp index 29aa2038..9b4a60f9 100644 --- a/core/smn_lang.cpp +++ b/core/smn_lang.cpp @@ -113,7 +113,7 @@ static cell_t sm_SetClientLanguage(IPluginContext *pContext, const cell_t *param return pContext->ThrowNativeError("Invalid client index %d", params[1]); } - player->m_LangId = params[2]; + player->SetLanguageId(params[2]); return 1; }