public Action:Ambient(String:sample[PLATFORM_MAX_PATH], &entity, &Float:volume, &level, &pitch, Float:pos[3], &flags, &Float:delay)
{
decl String:buffer[32];
for (new m = 1; m <= MaxClients; m++)
{
if (IsClientInGame(m) && AreClientCookiesCached(m))
{
GetClientCookie(m, hudCookie, buffer, sizeof(buffer));
if (!StrEqual(buffer, "1"))
EmitSoundToClient(m, sample, entity, SNDCHAN_STATIC, level, flags, volume, pitch, _, pos);
}
}
return Plugin_Handled;
}