Fixed a couple of plugin errors with third party mods (bug 3305)

This commit is contained in:
Matt Woodrow 2008-10-09 20:18:16 +13:00
parent ed75da0f85
commit b7a2f221f2
2 changed files with 11 additions and 1 deletions

View File

@ -409,7 +409,7 @@ SendChatToAll(client, String:message[])
for (new i = 1; i <= MaxClients; i++)
{
if (!IsClientConnected(i) || IsFakeClient(i))
if (!IsClientInGame(i) || IsFakeClient(i))
{
continue;
}

View File

@ -192,6 +192,11 @@ public Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (!client)
{
return;
}
if (g_Muted[client])
{
SetClientListeningFlags(client, VOICE_MUTED);
@ -206,6 +211,11 @@ public Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
if (!client)
{
return;
}
if (g_Muted[client])
{
SetClientListeningFlags(client, VOICE_MUTED);