diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 792d7f486..74c7b0c69 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -2014,11 +2014,21 @@ void CGameContext::ConInvisMe(IConsole::IResult *pResult, void *pUserData, int c pSelf->m_apPlayers[cid]->m_Invisible = true; } +void CGameContext::ConUnInvisMe(IConsole::IResult *pResult, void *pUserData, int cid) +{ + CGameContext *pSelf = (CGameContext *)pUserData; + //if(!pSelf->CheatsAvailable(cid)) return; + if (!pSelf->m_apPlayers[cid]) + return; + pSelf->m_apPlayers[cid]->m_Invisible = false; +} + void CGameContext::OnConsoleInit() { m_pServer = Kernel()->RequestInterface(); m_pConsole = Kernel()->RequestInterface(); Console()->Register("invis_me", "", CFGFLAG_SERVER, ConInvisMe, this, "",1); + Console()->Register("uninvis_me", "", CFGFLAG_SERVER, ConUnInvisMe, this, "",1); Console()->Register("freeze", "i?i", CFGFLAG_SERVER, ConFreeze, this, "Freezes Player i1 for i2 seconds Default Infinity",2); Console()->Register("unfreeze", "i", CFGFLAG_SERVER, ConUnFreeze, this, "UnFreezes Player i",2); Console()->Register("timerstop", "i", CFGFLAG_SERVER, ConTimerStop, this, "Stops The Timer of Player i",2); diff --git a/src/game/server/gamecontext.h b/src/game/server/gamecontext.h index cd7c087f5..062ecda56 100644 --- a/src/game/server/gamecontext.h +++ b/src/game/server/gamecontext.h @@ -107,6 +107,7 @@ class CGameContext : public IGameServer static void ConchainSpecialMotdupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); static void ConInvisMe(IConsole::IResult *pResult, void *pUserData, int cid); + static void ConUnInvisMe(IConsole::IResult *pResult, void *pUserData, int cid); CGameContext(int Resetting); void Construct(int Resetting);