diff --git a/StopSound/scripting/StopSound.sp b/StopSound/scripting/StopSound.sp index f6507d5d..9f4eba16 100644 --- a/StopSound/scripting/StopSound.sp +++ b/StopSound/scripting/StopSound.sp @@ -518,8 +518,8 @@ public Action Hook_NormalSound_CSS(int clients[MAXPLAYERS], int &numClients, cha return Plugin_Continue; } - int owner = entity; - if(owner > MaxClients) + int owner = -1; + if(entity > MaxClients) { char sClassname[64]; if(GetEntityClassname(entity, sClassname, sizeof(sClassname))) @@ -534,7 +534,7 @@ public Action Hook_NormalSound_CSS(int clients[MAXPLAYERS], int &numClients, cha for(int i = 0; i < numClients; i++) { int client = clients[i]; - if(owner == client || (!g_bStopWeaponSounds[client] && IsClientInGame(client))) + if(owner == client || (!g_bStopWeaponSounds[client])) { // Keep client. clients[j] = clients[i];