From 96527c93dc610745256fbfe4ef9927ae4bb6709d Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Wed, 6 Jun 2007 20:42:46 +0000 Subject: [PATCH] Changed a few natives/stocks that should have used IsClientInGame() rather than IsClientConnected() --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40897 --- core/smn_halflife.cpp | 18 +++++++++--------- plugins/include/menus.inc | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/smn_halflife.cpp b/core/smn_halflife.cpp index 3c55ab34..ef03c91b 100644 --- a/core/smn_halflife.cpp +++ b/core/smn_halflife.cpp @@ -264,12 +264,12 @@ static cell_t smn_CreateDialog(IPluginContext *pContext, const cell_t *params) if (!pPlayer) { - return pContext->ThrowNativeError("Player %d is not a valid player", params[1]); + return pContext->ThrowNativeError("Client %d is not valid", params[1]); } - if (!pPlayer->IsConnected()) + if (!pPlayer->IsInGame()) { - return pContext->ThrowNativeError("Player %d is not connected", params[1]); + return pContext->ThrowNativeError("Client %d is not in game", params[1]); } pKV = g_SourceMod.ReadKeyValuesHandle(hndl, &herr, true); @@ -290,12 +290,12 @@ static cell_t PrintToChat(IPluginContext *pContext, const cell_t *params) if (!pPlayer) { - return pContext->ThrowNativeError("Player %d is not a valid player", params[1]); + return pContext->ThrowNativeError("Client %d is not valid", params[1]); } - if (!pPlayer->IsConnected()) + if (!pPlayer->IsInGame()) { - return pContext->ThrowNativeError("Player %d is not connected", params[1]); + return pContext->ThrowNativeError("Client %d is not in game", params[1]); } char buffer[256]; @@ -313,12 +313,12 @@ static cell_t PrintCenterText(IPluginContext *pContext, const cell_t *params) if (!pPlayer) { - return pContext->ThrowNativeError("Player %d is not a valid player", params[1]); + return pContext->ThrowNativeError("Client %d is not valid", params[1]); } - if (!pPlayer->IsConnected()) + if (!pPlayer->IsInGame()) { - return pContext->ThrowNativeError("Player %d is not connected", params[1]); + return pContext->ThrowNativeError("Client %d is not in game", params[1]); } char buffer[256]; diff --git a/plugins/include/menus.inc b/plugins/include/menus.inc index 74206db1..d1f5e5b9 100644 --- a/plugins/include/menus.inc +++ b/plugins/include/menus.inc @@ -320,7 +320,7 @@ stock VoteMenuToAll(Handle:menu, time) for (new i=1; i<=num; i++) { - if (!IsClientConnected(i)) + if (!IsClientInGame(i)) { continue; }