Added command uninvis_me

Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
GreYFoXGTi 2010-09-16 23:44:59 +03:00
parent 427fedb79b
commit c17371d2e4
2 changed files with 11 additions and 0 deletions

View file

@ -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<IServer>();
m_pConsole = Kernel()->RequestInterface<IConsole>();
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);

View file

@ -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);