Quote:
Originally Posted by midnight9
Yes exactly, the plugin allready handles the voice and chat mutes just fine. I just dont know how to pernamently mute 2 steam ids for each other using that plugin.
|
Try
Code:
char STEAM_ID1[] = "xxxxxxx";
char STEAM_ID2[] = "xxxxxxx";
public void OnClientPostAdminCheck(int client)
{
if (IsFakeClient(client)) return;
char id[64]; int client2;
GetClientAuthId(client, AuthId_Steam2, id, sizeof(id));
if (StrEqual(id, STEAM_ID1))
{
client2 = FindPlayer(STEAM_ID2);
}
else if (StrEqual(id, STEAM_ID2))
{
client2 = FindPlayer(STEAM_ID1);
}
if (client2)
{
SetListenOverride(client, client2, Listen_No);
SetListenOverride(client2, client, Listen_No);
}
}
stock int FindPlayer(const char[] thatMthFuckingSteamId)
{
char id[64]; int player;
for (int i = 1; i <= MaxClients; i++)
{
if(IsClientInGame(i) && !IsFakeClient(i))
{
GetClientAuthId(i, AuthId_Steam2, id, sizeof(id));
if (StrEqual(id, thatMthFuckingSteamId))
{
return player;
}
}
}
return -1;
}