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
This commit is contained in:
parent
3a182c20b1
commit
96527c93dc
@ -264,12 +264,12 @@ static cell_t smn_CreateDialog(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
if (!pPlayer)
|
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);
|
pKV = g_SourceMod.ReadKeyValuesHandle(hndl, &herr, true);
|
||||||
@ -290,12 +290,12 @@ static cell_t PrintToChat(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
if (!pPlayer)
|
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];
|
char buffer[256];
|
||||||
@ -313,12 +313,12 @@ static cell_t PrintCenterText(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
if (!pPlayer)
|
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];
|
char buffer[256];
|
||||||
|
@ -320,7 +320,7 @@ stock VoteMenuToAll(Handle:menu, time)
|
|||||||
|
|
||||||
for (new i=1; i<=num; i++)
|
for (new i=1; i<=num; i++)
|
||||||
{
|
{
|
||||||
if (!IsClientConnected(i))
|
if (!IsClientInGame(i))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user