From b7a2f221f255a10339909edbb6f951192335f573 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Thu, 9 Oct 2008 20:18:16 +1300 Subject: [PATCH] Fixed a couple of plugin errors with third party mods (bug 3305) --- plugins/basechat.sp | 2 +- plugins/basecomm.sp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/basechat.sp b/plugins/basechat.sp index 307e1f3a..d21ecce0 100644 --- a/plugins/basechat.sp +++ b/plugins/basechat.sp @@ -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; } diff --git a/plugins/basecomm.sp b/plugins/basecomm.sp index c2a6612f..0621a699 100644 --- a/plugins/basecomm.sp +++ b/plugins/basecomm.sp @@ -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);