Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <cstrike>
- #include <sdktools>
- #include <clientprefs>
- #include <adminmenu>
- #include <basecomm>
- #include "include/sourcecomms.inc"
- #define Spectators 1
- #define Terrorists 2
- #define CounterTerrorists 3
- #pragma semicolon 1
- public Plugin:myinfo =
- {
- name = "TMUTE",
- author = "Selector",
- version = "1.0"
- }
- public OnPluginStart()
- {
- RegAdminCmd( "sm_tmute", Jail_Tmute, ADMFLAG_VOTE, "mute the terrorists" );
- RegAdminCmd( "sm_tunmute", Jail_Tunmute, ADMFLAG_VOTE, "mute the terrorists" );
- }
- public Action:Jail_Tmute(client, args)
- {
- if ( args > 1 )
- {
- ReplyToCommand( client, "\x03[Jail] \x04Usage: !tmute" );
- return Plugin_Handled;
- }
- PrintToChatAll( "[SM] The terrorists are muted." );
- for ( new iClient = 1; iClient <= MaxClients; iClient++ )
- {
- if ( IsClientInGame( iClient ) )
- {
- if ( GetUserAdmin( iClient ) != INVALID_ADMIN_ID )
- {
- return Plugin_Continue;
- }
- if ( GetClientListeningFlags( iClient ) != VOICE_MUTED )
- {
- if ( GetClientTeam( iClient ) == Terrorists )
- {
- SetClientListeningFlags( iClient, VOICE_MUTED );
- }
- }
- }
- }
- return Plugin_Continue;
- }
- public Action:Jail_Tunmute(client, args)
- {
- if ( args > 1 )
- {
- ReplyToCommand( client, "\x03[Jail] \x04Usage: !tunmute" );
- return Plugin_Handled;
- }
- PrintToChatAll( "[SM] The terrorists are no longer muted." );
- for ( new iClient = 1; iClient <= MaxClients; iClient++ )
- {
- if ( IsClientInGame( iClient ) )
- {
- if ( GetUserAdmin( iClient ) != INVALID_ADMIN_ID )
- {
- return Plugin_Continue;
- }
- if ( GetClientListeningFlags( iClient ) == VOICE_MUTED )
- {
- if ( GetClientTeam( iClient ) == Terrorists )
- {
- if ( IsPlayerAlive( iClient ) )
- {
- if(bType:SourceComms_GetClientMuteType(iClient) == bNot)
- {
- SetClientListeningFlags( iClient, VOICE_NORMAL );
- }
- }
- }
- }
- }
- }
- return Plugin_Continue;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement