[Cerere Plugin] Gag Sound

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
tiberiuiurco
Membru, skill 0
Membru, skill 0
Posts: 99
Joined: 10 Mar 2014, 20:06
Detinator Steam: Nu
CS Status: Uite pe-aici:)
Detinator server CS: Privat!
SteamID: Tyby /t/. aka RO
Location: Tulcea
Has thanked: 3 times
Been thanked: 1 time
Contact:

05 Jan 2015, 19:59

Plugin Cerut: Gag Sound
Descriere (adica ce face el mai exact): Salut!As dori un plugin ca cel de mai jos ,dar atunci cand sau gag si ungag sa se porneasca niste sunete ,si anume ,atunci cand dau gag sa se porneasca un sunet din sound/misc/gag_dat.wav/ ,iar cand dau ungag sa se porneasca un sunet din sound/misc/gag_scos.wav
Mai am un plugin de genul acesta dar cel gag-uit poate vorbi...eu vreau ca acest plugin sa nu aiba niciun bug si nu vreau prefix in fata celui gag-uit....o data ce am dat gag-ul,acel jucator cand intra a doua oara sa isi continue minutele ramase din gag! Subliniez fara buguri!
Ai cautat pluginul?(daca da, precizeaza cum): -
Serverul impune conditii strict HLDS/REHLDS?: -
Necesita mod special?: -
Versiune AMXX Server: -

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <nvault> 

#define ACCESS    ADMIN_SLAY
#define WORDS   999
#define SWEAR_GAGMINUTES 3
#define SHOW

new const g_FileName[] = "automute-words.ini";

new 
bool:g_Gaged[ 33 ], g_GagTime[ 33 ],
bool:g_SwearGag[ 33 ], bool:g_CmdGag[ 33 ],
bool:g_NameChanged[33];

new g_reason[ 32 ], g_admin[ 32 ], g_name[ 33 ][ 32 ];

new g_WordsFile[ 128 ];
new g_Words[ WORDS ][ 32 ], g_Count, g_Len;
new point
new g_vault

public plugin_init() 
{
    register_plugin("GAG-Manager", "1.0", "ExoTiQ")
    
    register_concmd( "amx_gag", "gag_cmd", ACCESS,"- <nume> <minute> <motiv> [Plugin by ExoTiQ]" );
    register_concmd( "amx_ungag", "ungag_cmd", ACCESS, "- <nume>" );
    register_clcmd( "say", "check" );
    register_clcmd( "say_team", "check" );
    g_vault = nvault_open("ListaDisconnect");
    point = get_cvar_pointer( "amx_show_activity" );
    
}

public plugin_cfg()
{
    static dir[ 999 ];
    get_localinfo( "amxx_configsdir", dir, 998 );
    formatex( g_WordsFile , 127 , "%s/%s" , dir, g_FileName );
    
    if( !file_exists( g_WordsFile ) )
        write_file( g_WordsFile, "[Gag Words]", -1 );
    
    new Len;
    
    while( g_Count < WORDS && read_file( g_WordsFile, g_Count ,g_Words[ g_Count ][ 1 ], 30, Len ) )
    {
        g_Words[ g_Count ][ 0 ] = Len;
        g_Count++;
    }
}

public client_connect(id)
{
    LoadMutedPlayers(id)
}

public gag_cmd( id, level, cid )
{
    if( !cmd_access( id, level, cid, 4 ) )
        return PLUGIN_HANDLED;   
    
    new arg[ 32 ], arg2[ 6 ], reason[ 32 ];
    new name[ 32 ], namet[ 32 ];
    new minutes;
    
    read_argv(1, arg, 31)
    
    new player = cmd_target(id, arg, 9)
    
    if (!player) 
        return PLUGIN_HANDLED
    
    read_argv( 1, arg, sizeof arg - 1 );
    read_argv( 2, arg2, sizeof arg2 - 1 );
    read_argv( 3, reason, sizeof reason - 1 );
    
    get_user_name( id, name, 31 );
    
    copy( g_admin, 31, name );
    copy( g_reason, 31, reason );
    remove_quotes( reason );
    
    minutes = str_to_num( arg2 );
    
    new target = cmd_target( id, arg, 10 );
    if( !target)
        return PLUGIN_HANDLED;
    
    if( g_Gaged[ target ] )
    {
        console_print( id, "Jucatorul deja are gag!" );
        return PLUGIN_HANDLED;
    }
    
    get_user_name( target, namet, 31 );
    copy( g_name[ target ], 31, namet );
    
    g_CmdGag[ target ] = true;
    g_Gaged[target] = true;
    g_GagTime[ target ] = minutes;
    
    culoare_scris( 0, "!verde[GAG-Manager] !verde%s: !verde!team%s !team a primit gag pentru !verde %d minute. !teamMotiv: !verde%s",get_pcvar_num( point ) == 2 ? name : "", namet, minutes, reason );
    
    
    set_task( 60.0, "count", target + 123, _, _, "b" );
    
    return PLUGIN_HANDLED;
}

public ungag_cmd( id,level, cid )
{
    if( !cmd_access( id, level, cid, 2 ) )
        return PLUGIN_HANDLED;
    
    new arg[ 32 ], reason[ 32 ], name[ 32 ];
    read_argv( 1, arg, sizeof arg - 1 );
    read_argv( 2, reason, sizeof reason - 1 );
    get_user_name( id, name, sizeof name - 1 );
    remove_quotes( reason );
    
    new target = cmd_target( id, arg, 11 );
    if( !target )
        return PLUGIN_HANDLED;
    new namet[ 32 ];
    get_user_name( target, namet, sizeof namet - 1 );
    
    if( !g_Gaged[ target ] )
    {
        console_print( id, "Jucatorul %s nu are gag.", namet );
        return PLUGIN_HANDLED;
    }
    
    g_Gaged[ target ] = false;
    g_SwearGag[ target ] = false;
    
    if( g_NameChanged[ target ] )
        client_cmd( target, "name ^"%s^"", g_name[ target ] );
    
    g_NameChanged[ target ] = false;
    
    remove_task( target + 123 );
    
    culoare_scris( 0, "!verde[GAG-Manager] !team%s: !team A scos gag jucatorului !verde!team%s",get_pcvar_num( point ) == 2 ? name : "", namet );
    
    return PLUGIN_HANDLED;
}

public count( task )
{
    new index = task - 123;
    if( !is_user_connected( index ) )
        return 0;
    
    g_GagTime[index] -= 1;
    
    if( g_GagTime[ index ] <= 0 )
    {
        remove_task( index + 123 );
        new name[ 32 ]
        get_user_name( index, name, 31 );
        culoare_scris( 0, "!verde[GAG-Manager] !team %s  Nu mai are gag!",name );
        g_Gaged[ index ] = false;
        
        if( g_NameChanged[ index ] )
            client_cmd( index, "name ^"%s^"", g_name[ index ] );
        
        return 0;
    }
    
    return 1;
}

public check( id )
{
    new said[ 192 ];
    read_args( said, sizeof said - 1 );
    
    if( !strlen( said ) )
        return PLUGIN_CONTINUE;
    
    if( g_Gaged[ id ] )
    {
        if( g_CmdGag[ id ] )
        {
            culoare_scris( id,"!team[!verdeGAG-Manager!team] !verde  [ !team Ai luat gag de la !verde%s !verde] ", g_admin);
            culoare_scris( id,"!team[!verdeGAG-Manager!team] !verde  [ !team Timp ramas pentru ungag !verde%d minutes !verde] " , g_GagTime[ id ], g_GagTime[ id ] == 1 ? "" : "s" );
            culoare_scris( id,"!team[!verdeGAG-Manager!team] !verde  [ !team Motiv: !verde%s !verde] ", g_reason );
            
            return PLUGIN_HANDLED;
            
            } else if( g_SwearGag[ id ] ) {
            culoare_scris( id, "!verde[GAG-Manager] !verde  [ !team Ai primit interzicere pentru folosirea chatului! (Reclama,Swear) !verde] ")
            culoare_scris( id,"!verde[GAG-Manager] !verde  [ !team Timp ramas pentru ungag !verde%d !verdeminutes !verde] " , g_GagTime[ id ], g_GagTime[ id ] == 1 ? "" : "s" );
            return PLUGIN_HANDLED;
        }
        } else {
        
        new bool:g_Sweared, i, pos;
        
        for( i = 0; i < g_Count; ++i )
        {
            if( ( pos = containi( said, g_Words[ i ][ 1 ] ) ) != -1 )
            {
                g_Len = g_Words[ i ][ 0 ];
                
                while( g_Len-- )
                    said[ pos++ ] = '*';
                
                g_Sweared = true;
                continue;
            }
        }
        
        if( g_Sweared )
        {
            new cmd[ 32 ], name[ 32 ];
            
            get_user_name( id, name, sizeof name - 1 );
            read_argv( 0, cmd, sizeof cmd - 1 );
            copy( g_name[ id ], 31, name );
            
            engclient_cmd( id, cmd, said );
            g_Gaged[ id ] = true;
            g_CmdGag[ id ] = false;
            
            
            
            g_SwearGag[ id ] = true;
            g_GagTime[ id ] = SWEAR_GAGMINUTES;
            
            culoare_scris( 0,"!team !verde [GAG-Filter] !normal muted !team%s !normal for !verde 3 !normal minutes",name );
            
            
            set_task( 60.0, "count",id+123,_,_,"b");
            
            return PLUGIN_HANDLED;
        }
    }
    
    return PLUGIN_CONTINUE;
}

public client_disconnect(id) 
{ 
    if(g_Gaged[id]) 
    {
        new Nick[32],Authid[35],userip[32]
        get_user_name(id,Nick,31)
        get_user_ip(id,userip,31);
        get_user_authid(id,Authid,34) 
        culoare_scris(0, "!team[!normalGAG-Manager!team] !normal Jucatorul cu gag  !verde%s !team[!normalIP: !verde%s!team] !normalA iesit de pe server.",Nick,userip)        
        SaveMutedPlayers(id);    
        remove_task( id );
	g_Gaged[id] = false;
        
    }
}

public SaveMutedPlayers(id) 
{ 
    
    new name[32], userip[32];
    get_user_name(id,name,31); 
    get_user_ip(id,userip,31);
    new vaultkey[64],vaultdata[256]  
    format(vaultkey,63,"%s[IP: %s]-Muted",name,userip) 
    format(vaultdata,255,"%i#%i#",g_Gaged[id],g_SwearGag[id]) 
    nvault_set(g_vault,vaultkey,vaultdata) 
    return PLUGIN_CONTINUE 
}  

public LoadMutedPlayers(id) 
{ 
    new name[32], userip[32];
    get_user_name(id,name,31); 
    get_user_ip(id,userip,31);
    new vaultkey[64],vaultdata[256] 
    format(vaultkey,63,"%s[IP: %s]-Muted",name,userip) 
    format(vaultdata,255,"%i#%i#",g_Gaged[id],g_SwearGag[id])
    nvault_get(g_vault,vaultkey,vaultdata,255) 
    replace_all(vaultdata, 255, "#", " ") 
    return PLUGIN_CONTINUE 
}  

stock culoare_scris(const id, const input[], any:...)
{
    new count = 1, players[32]
    static msg[191]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!verde", "^4")
    replace_all(msg, 190, "!normal", "^1")
    replace_all(msg, 190, "!team", "^3")
    
    if (id) players[0] = id; else get_players(players, count, "ch")
    {
        for (new i = 0; i < count; i++)
        {
            if (is_user_connected(players[i]))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
                write_byte(players[i]);
                write_string(msg);
                message_end();
            }
        }
    }  
}
Image
----Image----Pe forum sa-i ajut pe altii;)----------------|
Stiu 11 lucruri despre tine:........................................|
1.Citesti asta...........................................................|
2.Esti om.................................................................|
3.Nu poti sa pronunti "p" fara sa desparti buzele..........|
4.Tocmai ai incercat..................................................|
6.Te uiti mai departe.................................................|
7.Razi de tine...........................................................|
8.Nu ai realizat ca ai sarit peste punctul 5...................|
9.Ai verificat sa vezi daca e vreun 5...........................|
10.Razi de asta pentru ca toata lumea face la fel.........|
11.Esti pe site-ul http://www.extreamcs.com/
:............|
----Image----Cam asta a fost si semnatura mea;)!-----|
|---------------------YOLO--------------------|Image|
|-------------You Only Live Once------------|Image|
Daca ti-am fost de folos cu ceva citeste urmatoarele::[/color]
| Afiseaza codul
Nu uita sa-mi multumesti;)

Plugin-uri personale:
Plugin eXtreamCs Server Lama Premiu<----un premiu pentru serverele cu 35hp.bsp sau cele de cutite:D---->http://www.extreamcs.com/forum/pluginur ... 61800.html
RoyalServer
User avatar
pisoi.
Fost moderator
Fost moderator
Posts: 961
Joined: 29 Jul 2012, 02:29
Detinator Steam: Da
Detinator server CS: cs.lafraguri.ro
SteamID: pisoi-ucs
Reputatie: Fost moderator
Nume anterior : pisoino1
Location: Targoviste.
Has thanked: 93 times
Been thanked: 31 times
Contact:

09 Jan 2015, 20:20

| Afiseaza codul
/* 

	amx_autogag_time 3 // minutele pentru gag cand ia autogag
	amx_gag_minute_limit 300 // limita maxima pentru gag minute
	amx_gag_minute_in_seconds 60 // minute in secunde
	amx_gag_tagname 1 // pune taguri la gag
	amx_admingag 0 // poti da si la admini gag daca e egal cu 1, daca e 0 nu poti
	amx_maxwords 200 // lista maxima de cuvinte in gag_words.ini
	amx_gagtag * // tag-ul din chat
	
	amx_gag < nume > < timp in minute > - dai gag unui jucator pentru x minute
	amx_ungag < nume > ii scoti gag-ul unui jucator
	
	/gag < nume > < timp in minute > - dai gag unui jucator pentru x minute
	/ungag < nume > ii scoti gag-ul unui jucator

	Cand un jucator cu gag iese de pe server va fi salvat intr-un fisier
	Atunci cand se va conecta pe server va avea gag exact cate minute mai avea cand a iesit de pe server
	
	Autor: Cristi. C
*/	

#include < amxmodx >
#include < amxmisc >

#include < fakemeta >
#include < engine >
#include < nvault >
#include < CC_ColorChat >

#pragma semicolon 1

#define PLUGIN "Special Admin Gag"
#define VERSION "1.0"

#define COMMAND_ACCESS  	ADMIN_KICK // accesu adminilor pentru comanda
#define MAX_PLAYERS 		32 + 1

enum
{
	INFO_NAME,
	INFO_IP,
	INFO_AUTHID
};

new const bars[ ] = "/";

new command[ ] [ ] = 
{
        "/gag", 
        "/ungag"
};

new Caccess[ ] = 
{
	COMMAND_ACCESS,
	COMMAND_ACCESS
};

new const gGagTag[ ] = "[Gag]";
new const gGagFileName[ ] = "gag_words.ini";
new const gLogFileName[ ] = "GagLog.log"; 

new const gGagThinkerClassname[ ] = "GagThinker_";
new const gGagVaultName[ ] = "GaggedPlayers";

new const gGaggedSound[ ] = "misc/gag_dat.wav";
new const gUnGaggedSound[ ] = "misc/gag_scos.wav";

new const gHalfLifeGaggedSounds[ ][ ] =
{
	"barney/youtalkmuch.wav",
	"scientist/stopasking.wav",
	"scientist/shutup.wav",
	"scientist/shutup2.wav",
	"hgrunt/silence!.wav"
};

new PlayerGagged[ MAX_PLAYERS ];
new PlayerGagTime[ MAX_PLAYERS ];
new JoinTime[ MAX_PLAYERS ];
new szName[ 33 ];

new g_Words[ 562 ] [ 32 ], g_Count;
new szOldName[ MAX_PLAYERS ] [ 40 ];

new gCvarSwearGagTime;
new gCvarGagMinuteLimit;
new gCvarGagMinuteInSeconds;
new gCvarAdminGag;
new gCvarTagName;
new gCvarWords;
new gCvarTag;

new gMaxPlayers;
new gVault;

public plugin_init( ) 
{
	register_plugin( PLUGIN, PLUGIN, "Cristi .C" );
	
	register_concmd( "amx_gag", "CommandGag" ); 
	register_concmd( "amx_ungag", "CommandUngag" );
	
	register_clcmd( "say", "CheckGag" );
	register_clcmd( "say_team", "CheckGag" );
	
	register_clcmd( "say", "command_chat" );
	
	GagThinker( );
	register_think( gGagThinkerClassname, "Forward_GagThinker" );

	gCvarSwearGagTime = register_cvar( "amx_autogag_time", "3" ); // minutele pentru gag cand ia autogag
	gCvarGagMinuteLimit = register_cvar( "amx_gag_minute_limit", "300" ); // limita maxima pentru gag minute
	gCvarGagMinuteInSeconds = register_cvar( "amx_gag_minute_in_seconds", "60" ); // minute in secunde
	gCvarTagName = register_cvar( "amx_gag_tagname", "1" ); // pune taguri la gag
	gCvarAdminGag = register_cvar( "amx_admingag", "0" ); // poti da si la admini gag daca e egal cu 1, daca e 0 nu poti
	gCvarWords = register_cvar( "amx_maxwords", "200" ); // lista maxima de cuvinte in gag_words.ini
	gCvarTag = register_cvar( "amx_gagtag", "*" ); // tag-ul din chat
	
	gMaxPlayers = get_maxplayers( );
}

public plugin_precache( )
{
	new i;
	for( i = 0; i < sizeof gHalfLifeGaggedSounds; i++ )
	{
		precache_sound( gHalfLifeGaggedSounds[ i ] );
	}

	precache_sound( gGaggedSound );
	precache_sound( gUnGaggedSound );
}

public plugin_cfg( ) 
{
	static szConfigDir[ 64 ], iFile[ 64 ];

	get_localinfo ( "amxx_configsdir", szConfigDir, 63 );
	formatex ( iFile , charsmax( iFile ) , "%s/%s" , szConfigDir, gGagFileName );
	
	if( !file_exists( iFile ) )
	{
		write_file( iFile, "# Pune aici cuvintele jignitoare sau reclamele", -1 );
		log_to_file( gLogFileName, "Fisierul <%s> nu exista! Creez unul nou acum...", iFile );
	}
		
	new szBuffer[ 128 ];
        new szFile = fopen( iFile, "rt" );

        while( !feof( szFile ) )
        {
        	fgets( szFile, szBuffer, charsmax( szBuffer ) );

           	if( szBuffer[ 0 ] == '#' )
           	{
                	continue;
            	}
		
		parse( szBuffer, g_Words[ g_Count ], sizeof g_Words[ ] - 1 );
		g_Count++;
		
		if( g_Count >= get_pcvar_num ( gCvarWords ) )
		{
			break;
		}
	}
	
	fclose( szFile );
}

public client_putinserver( id ) 
{ 
	if ( is_user_connected( id ) )
	{
		JoinTime[ id ] = get_systime( );
	}
}

public client_disconnect( id )
{
	if ( PlayerGagged[ id ] == 1 )
	{	
		ColorChat( 0, RED, "^4%s^1 Jucatorul cu gag^4 %s^1(^3%s^1|^3%s^1), s-a deconectat!", get_tag( ), GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ), GetInfo( id, INFO_AUTHID ) );
		log_to_file( gLogFileName, "[EXIT]Jucatorul cu gag <%s><%s><%s>, s-a deconectat!", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ), GetInfo( id, INFO_AUTHID ) );
	}

	JoinTime[ id ] = 0 ;
	SaveGag( id );
}

public client_connect( id )
{
	LoadGag( id );
}

public command_chat( index )
{
	static szArg[ 192 ], command2[ 192 ];

        read_args( szArg, charsmax ( szArg ) );
	
        if( ! szArg [ 0 ] )
        	return PLUGIN_CONTINUE;

        remove_quotes( szArg[0] );
	
        for( new x; x < sizeof command; x++ )
        {
        	if ( equal ( szArg, command [ x ], strlen ( command [ x ] ) ) )
           	{
              		if ( get_user_flags ( index ) & Caccess [ x ] )
              		{
                 		replace( szArg, charsmax ( szArg ), bars, "" );
                 		formatex( command2, charsmax(command2), "amx_%s", szArg );
                 		client_cmd( index, command2 );
              		}	

              		break;
           	}
        }
	
        return PLUGIN_CONTINUE;
}

public CheckGag( id ) 
{
	new szSaid[ 300 ];

	read_args( szSaid, charsmax( szSaid ) );
	remove_quotes( szSaid );
	
	if( !UTIL_IsValidMessage( szSaid ) )
	{
		return PLUGIN_HANDLED;
	}

	if ( PlayerGagged[ id ] == 1 ) 
	{
		PlayerGagged[ id ] = 1;
		
		ColorChat( id, RED, "^4%s^1 Ai primit Gag pentru limbaj vulgar, asteapta^4 %d^1 minute!", get_tag( ), PlayerGagTime[ id ] );
		client_cmd( id, "speak ^"%s^"", gHalfLifeGaggedSounds[ random_num( 0, charsmax( gHalfLifeGaggedSounds ) ) ] );	

		return PLUGIN_HANDLED;
	}

	else
	{
		new i;
		for( i = 0; i < get_pcvar_num ( gCvarWords ); i++ )
		{
			if( containi( szSaid, g_Words[ i ] ) != -1 )
			{
				if( get_pcvar_num( gCvarAdminGag ) == 0 )
				{
					if ( is_user_admin ( id ) )
					{	
						return 1;
					}
				}

				get_user_name( id, szName, sizeof ( szName ) -1 );
			
				if ( get_pcvar_num( gCvarTagName ) == 1 )
				{
					client_cmd( id, "name ^"%s %s^"", gGagTag, szName );
				}
			
				szOldName[ id ] = szName;

				PlayerGagged[ id ] = 1;
				PlayerGagTime[ id ] = get_pcvar_num ( gCvarSwearGagTime );
				set_speak( id, SPEAK_MUTED );
			
				ColorChat( 0, RED, "^3%s^4 %s^1 (^3%s^1)^1 a primit AutoGag pentru limbaj sau reclama!", get_tag( ), GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ) );
				ColorChat( id, RED, "^4%s^1 Ai primit AutoGag pentru injuratura sau reclama! Timpul expira in:^4 %d^1 minute!", get_tag( ), PlayerGagTime[ id ] );
				ColorChat( id, RED, "^4%s^1 Nu mai poti folosi urmatoarele comenzi:^4 say^1,^4 say_team^1,^4 voice speak", get_tag( ) );

				log_to_file( gLogFileName, "[AUTOGAG]<%s><%s><%s> a luat AutoGag pentru ca a injurat sau a facut reclama!", GetInfo( id, INFO_NAME ), GetInfo( id, INFO_IP ), GetInfo( id, INFO_AUTHID ) );
				client_cmd( id, "speak ^"%s^"", gGaggedSound );

				return PLUGIN_HANDLED;
			}
		}
	}
	
	return PLUGIN_CONTINUE;
}

public CommandGag( id )  
{  
	if( !(get_user_flags( id ) & COMMAND_ACCESS ) )
	{
		client_cmd( id, "echo %s Nu ai acces la aceasta comanda!", get_tag( ) );
		return 1;
	}

	new szArg[ 32 ], szMinutes[ 32 ];

	read_argv( 1, szArg, charsmax ( szArg ) );

	if( equal( szArg, "" ) )
	{
		client_cmd( id, "echo amx_gag < nume > < minute > < motiv >!" );
		return 1;
	}
	
	new iPlayer = cmd_target( id, szArg, CMDTARGET_ALLOW_SELF );
	
	if( !iPlayer )
	{
		client_cmd( id, "echo %s Jucatorul specificat nu a fost gasit!", get_tag( ) );
		return 1;
	}
	
	if ( get_pcvar_num( gCvarAdminGag ) == 0 )
	{
		if ( is_user_admin( iPlayer ) )
		{
			client_cmd( id, "echo %s Nu poti da gag la Admini!", get_tag( ) );
			return 1;
		}
	}
	
	read_argv( 2, szMinutes, charsmax ( szMinutes ) );
	
	new iMinutes = str_to_num( szMinutes );

	if ( iMinutes > get_pcvar_num ( gCvarGagMinuteLimit ) )
	{
		console_print( id, "%s Ai setat %d minute, iar limita maxima de minute este %d! Setare automata pe %d.", get_tag( ), iMinutes, get_pcvar_float ( gCvarGagMinuteLimit ), get_pcvar_float ( gCvarGagMinuteLimit ) );
		iMinutes = get_pcvar_num( gCvarGagMinuteLimit ) ;
	}

	get_user_name( iPlayer, szName, sizeof ( szName ) -1 );
	
	szOldName[ iPlayer ] = szName;
	
	if( PlayerGagged[ iPlayer ] == 1 ) 
	{
		client_cmd( id, "echo %s Jucatorul %s are deja Gag!", get_tag( ), GetInfo( iPlayer, INFO_NAME ) );
		return 1;
	} 
	
	if ( get_pcvar_num( gCvarTagName ) == 1 )
	{
		client_cmd( iPlayer, "name ^"%s %s^"", gGagTag, szName );
	}
	
	PlayerGagged[ iPlayer ] = 1;
	PlayerGagTime[ iPlayer ] = iMinutes;
	set_speak( iPlayer, SPEAK_MUTED );

	ColorChat( 0, RED, "^4%s^1 ADMIN^4 %s:^1 Gag^3 %s^1(^3%s^1) pentru^4 %d^1 minute", get_tag( ), GetInfo( id, INFO_NAME ), GetInfo( iPlayer, INFO_NAME ), GetInfo( iPlayer, INFO_IP ), iMinutes ); 
	ColorChat( iPlayer, RED, "^4%s^1 Ai primit Gag pentru ca ai injurat sau ai facut reclama!", get_tag( ) ); 
	ColorChat( iPlayer, RED, "^4%s^1 Nu mai poti folosi urmatoarele comenzi:^4 say^1,^4 say_team^1,^4 voice speak", get_tag( ) );
	
	log_to_file( gLogFileName, "[GAG]%s i-a dat gag lui <%s><%s><%s> pentru <%d> minute", GetInfo( id, INFO_NAME ), GetInfo( iPlayer, INFO_NAME ), GetInfo( iPlayer, INFO_IP ), GetInfo( iPlayer, INFO_AUTHID ), iMinutes );
	client_cmd( iPlayer, "speak ^"%s^"", gGaggedSound );

	return PLUGIN_HANDLED;
}

public CommandUngag( id )  
{  
	if( !(get_user_flags( id ) & COMMAND_ACCESS ) )
	{
		client_cmd( id, "echo %s Nu ai acces la aceasta comanda!", get_tag( ) );
		return 1;
	}

	new szArg[ 32 ];
	
	read_argv( 1, szArg, charsmax( szArg ) );

	if( equal( szArg, "" ) )
	{
		client_cmd( id, "echo amx_ungag < nume > !" );
		return 1;
	}
	
	new iPlayer = cmd_target ( id, szArg, CMDTARGET_ALLOW_SELF );

	if( !iPlayer )
	{
		client_cmd(  id, "echo %s Jucatorul specificat nu a fost gasit!", get_tag( ) );
		return 1;
	}

	if( PlayerGagged[ iPlayer ] == 0 ) 
	{
		console_print( id, "%s Jucatorul %s nu are Gag!", get_tag( ), GetInfo( iPlayer, INFO_NAME ) );
		return 1;
	}
	
	if ( get_pcvar_num ( gCvarTagName ) == 1 )
	{
		client_cmd( iPlayer, "name ^"%s^"", szOldName[ iPlayer ] );
	}

	PlayerGagged[ iPlayer ] = 0;
	PlayerGagTime[ iPlayer ] = 0;
	set_speak( iPlayer, SPEAK_NORMAL );

	ColorChat( 0, RED, "^4%s^1 ADMIN^4 %s:^1 Ungag^3 %s^1(^3%s^1|^3%s^1)", get_tag( ), GetInfo( id, INFO_NAME ), GetInfo( iPlayer, INFO_NAME ), GetInfo( iPlayer, INFO_IP ), GetInfo( iPlayer, INFO_AUTHID ) ); 
	ColorChat( iPlayer, RED, "^4%s^1 Ai primit Ungag de la adminul: ^4%s^1, ai grija la limbaj data viitoare!", get_tag( ), GetInfo( id, INFO_NAME ) );
	
	log_to_file( gLogFileName, "[UNGAG]<%s> i-a dat ungag lui <%s><%s><%s>", GetInfo( id, INFO_NAME ), GetInfo( iPlayer, INFO_NAME ), GetInfo( iPlayer, INFO_IP ), GetInfo( iPlayer, INFO_AUTHID ) );
	client_cmd( iPlayer, "speak ^"%s^"", gUnGaggedSound );

	return PLUGIN_HANDLED;
}

public Forward_GagThinker( iEntity )
{
	if ( pev_valid( iEntity ) )
	{
		set_pev( iEntity, pev_nextthink, get_gametime( ) + 1.0 ) ;

		new id;
		for ( id = 1; id <= gMaxPlayers; id++ )
		{
			if ( is_user_connected ( id ) 	
			&& ! is_user_bot( id )
			&& PlayerGagged[ id ] == 1 
			&& PlayerGagTime[ id ] > 0
			&& ( ( get_systime( ) - JoinTime[ id ] ) >= get_pcvar_num ( gCvarGagMinuteInSeconds ) ) )
			{
				JoinTime[ id ] = get_systime( );
				PlayerGagTime[ id ] -= 1;

				if ( PlayerGagTime[ id ] <= 0 )
				{
					PlayerGagTime[ id ] = 0;
					PlayerGagged[ id ] = 0;
					set_speak( id, SPEAK_NORMAL );
					
					ColorChat( id, RED, "^4%s^3 Ai primit UnGag, ai grija la limbaj data viitoare!", get_tag( ) );
					log_to_file( gLogFileName, "[AUTOUNGAG]<%s> a primit AutoUnGag!", GetInfo( id, INFO_NAME ) );
						
					client_cmd( id, "speak ^"%s^"", gUnGaggedSound );
					client_cmd( id, "name ^"%s^"", szOldName[ id ] );
				}
			}
		}
	}
}

stock SaveGag( id )
{
	gVault = nvault_open( gGagVaultName );
	
	new szIp[ 40 ], szVaultKey[ 64 ], szVaultData[ 64 ];
	get_user_ip( id, szIp, charsmax( szIp ) );
	
	formatex( szVaultKey, charsmax( szVaultKey ), "%s-Gag", szIp );
	formatex( szVaultData, charsmax( szVaultData ), "%i#%i", PlayerGagged[ id ], PlayerGagTime[ id ] );
	
	nvault_set( gVault, szVaultKey, szVaultData );
	nvault_close( gVault );
}

stock LoadGag( id )
{
	gVault = nvault_open( gGagVaultName );
	
	new szIp[ 40 ], szVaultKey[ 64 ], szVaultData[ 64 ];
	get_user_ip( id, szIp, charsmax ( szIp ) );
	
	formatex( szVaultKey, charsmax( szVaultKey ), "%s-Gag", szIp );
	formatex( szVaultData, charsmax( szVaultData ), "%i#%i", PlayerGagged[ id ], PlayerGagTime[ id ] );
	nvault_get( gVault, szVaultKey, szVaultData, charsmax ( szVaultData ) );

	replace_all( szVaultData, charsmax( szVaultData ), "#", " " );

	new iGagOn[ 32 ], iGagTime [ 32 ];
	parse( szVaultData, iGagOn, charsmax ( iGagOn ), iGagTime, charsmax ( iGagTime ) );
	
	PlayerGagged[ id ] = str_to_num ( iGagOn );
	PlayerGagTime[ id ] = clamp ( str_to_num ( iGagTime ), 0, get_pcvar_num ( gCvarGagMinuteLimit ) );

	nvault_close( gVault );
}
							
stock GagThinker( )
{
	new iEntity = create_entity ( "info_target" );
	
	if( ! pev_valid ( iEntity ) )
	{
		return PLUGIN_HANDLED;
	}
	
	set_pev ( iEntity, pev_classname, gGagThinkerClassname );
	set_pev ( iEntity, pev_nextthink, get_gametime( ) + 1.0 );
	
	return PLUGIN_HANDLED;
}

stock get_tag( )
{
	new szTag [ 32 ];
	get_pcvar_string( gCvarTag, szTag, sizeof ( szTag ) -1 );

	return szTag;
}

stock GetInfo( id, const iInfo )
{
	new szInfoToReturn[ 64 ];
	
	switch( iInfo )
	{
		case INFO_NAME:
		{
			new szName[ 32 ];
			get_user_name( id, szName, sizeof ( szName ) -1 );
			
			copy( szInfoToReturn, sizeof ( szInfoToReturn ) -1, szName );
		}
		case INFO_IP:
		{
			new szIp[ 32 ];
			get_user_ip( id, szIp, sizeof ( szIp ) -1, 1 );
			
			copy( szInfoToReturn, sizeof ( szInfoToReturn ) -1, szIp );
		}
		case INFO_AUTHID:
		{
			new szAuthId[ 35 ];
			get_user_authid( id, szAuthId, sizeof ( szAuthId ) -1 );
			
			copy( szInfoToReturn, sizeof ( szInfoToReturn ) -1,  szAuthId );
		}
	}

	return szInfoToReturn;
}

stock bool:UTIL_IsValidMessage( const szSaid[ ] )
{
	new iLen = strlen( szSaid );

	if( !iLen )
	{
		return false;
	}
	
	for( new i = 0; i < iLen; i++ )
	{
		if( szSaid[ i ] != ' ' )
		{
			return true;
		}
	}
	
	return false;
}
Ai aici si sunetele http://www.girlshare.ro/34309519.2
CS.LAFRAGURI.RO - SERVER CS 1.6 STEAM ONLY
https://lafraguri.ro/forum/index.php
Image
User avatar
SkillartzHD
Membru, skill +3
Membru, skill +3
Posts: 1096
Joined: 08 Feb 2013, 19:43
Detinator Steam: Da
CS Status: HLDS Vulnerability
Detinator server CS: GoldSrc
SteamID: SkillartzHD_hlds
Reputatie: Fost Moderator ajutator
Location: Bucuresti
Has thanked: 14 times
Been thanked: 28 times
Contact:

09 Jan 2015, 20:39

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <nvault> 

#define ACCESS    ADMIN_SLAY
#define WORDS   999
#define SWEAR_GAGMINUTES 3
#define SHOW

#define GagPrimit "misc/gag_dat.wav"
#define GagScos "misc/gag_scos.wav"

new const g_FileName[] = "automute-words.ini";

new 
bool:g_Gaged[ 33 ], g_GagTime[ 33 ],
bool:g_SwearGag[ 33 ], bool:g_CmdGag[ 33 ],
bool:g_NameChanged[33];

new g_reason[ 32 ], g_admin[ 32 ], g_name[ 33 ][ 32 ];

new g_WordsFile[ 128 ];
new g_Words[ WORDS ][ 32 ], g_Count, g_Len;
new point
new g_vault

public plugin_precache() 
{
    register_plugin("GAG-Manager", "1.0", "ExoTiQ")
    
    register_concmd( "amx_gag", "gag_cmd", ACCESS,"- <nume> <minute> <motiv> [Plugin by ExoTiQ]" );
    register_concmd( "amx_ungag", "ungag_cmd", ACCESS, "- <nume>" );
    register_clcmd( "say", "check" );
    register_clcmd( "say_team", "check" );
    g_vault = nvault_open("ListaDisconnect");
    point = get_cvar_pointer( "amx_show_activity" );
    // precache sound
    precache_generic(GagPrimit);
    precache_generic(GagScos);
    // soundddddddddd
    
}

public plugin_cfg()
{
    static dir[ 999 ];
    get_localinfo( "amxx_configsdir", dir, 998 );
    formatex( g_WordsFile , 127 , "%s/%s" , dir, g_FileName );
    
    if( !file_exists( g_WordsFile ) )
        write_file( g_WordsFile, "[Gag Words]", -1 );
    
    new Len;
    
    while( g_Count < WORDS && read_file( g_WordsFile, g_Count ,g_Words[ g_Count ][ 1 ], 30, Len ) )
    {
        g_Words[ g_Count ][ 0 ] = Len;
        g_Count++;
    }
}

public client_connect(id)
{
    LoadMutedPlayers(id)
}

public gag_cmd( id, level, cid )
{
    if( !cmd_access( id, level, cid, 4 ) )
        return PLUGIN_HANDLED;   
    
    new arg[ 32 ], arg2[ 6 ], reason[ 32 ];
    new name[ 32 ], namet[ 32 ];
    new minutes;
    
    read_argv(1, arg, 31)
    
    new player = cmd_target(id, arg, 9)
    
    if (!player) 
        return PLUGIN_HANDLED
    
    read_argv( 1, arg, sizeof arg - 1 );
    read_argv( 2, arg2, sizeof arg2 - 1 );
    read_argv( 3, reason, sizeof reason - 1 );
    
    get_user_name( id, name, 31 );
    
    copy( g_admin, 31, name );
    copy( g_reason, 31, reason );
    remove_quotes( reason );
    
    minutes = str_to_num( arg2 );
    
    new target = cmd_target( id, arg, 10 );
    if( !target)
        return PLUGIN_HANDLED;
    
    if( g_Gaged[ target ] )
    {
        console_print( id, "Jucatorul deja are gag!" );
        return PLUGIN_HANDLED;
    }
    
    get_user_name( target, namet, 31 );
    copy( g_name[ target ], 31, namet );
    
    g_CmdGag[ target ] = true;
    g_Gaged[target] = true;
    g_GagTime[ target ] = minutes;
    
    culoare_scris( 0, "!verde[GAG-Manager] !verde%s: !verde!team%s !team a primit gag pentru !verde %d minute. !teamMotiv: !verde%s",get_pcvar_num( point ) == 2 ? name : "", namet, minutes, reason );
    client_cmd(0, "spk ^"%s^"",GagPrimit)
    
    set_task( 60.0, "count", target + 123, _, _, "b" );
    
    return PLUGIN_HANDLED;
}

public ungag_cmd( id,level, cid )
{
    if( !cmd_access( id, level, cid, 2 ) )
        return PLUGIN_HANDLED;
    
    new arg[ 32 ], reason[ 32 ], name[ 32 ];
    read_argv( 1, arg, sizeof arg - 1 );
    read_argv( 2, reason, sizeof reason - 1 );
    get_user_name( id, name, sizeof name - 1 );
    remove_quotes( reason );
    
    new target = cmd_target( id, arg, 11 );
    if( !target )
        return PLUGIN_HANDLED;
    new namet[ 32 ];
    get_user_name( target, namet, sizeof namet - 1 );
    
    if( !g_Gaged[ target ] )
    {
        console_print( id, "Jucatorul %s nu are gag.", namet );
        return PLUGIN_HANDLED;
    }
    
    g_Gaged[ target ] = false;
    g_SwearGag[ target ] = false;
    
    if( g_NameChanged[ target ] )
        client_cmd( target, "name ^"%s^"", g_name[ target ] );
    
    g_NameChanged[ target ] = false;
    
    remove_task( target + 123 );
    
    culoare_scris( 0, "!verde[GAG-Manager] !team%s: !team A scos gag jucatorului !verde!team%s",get_pcvar_num( point ) == 2 ? name : "", namet );
    client_cmd(0, "spk ^"%s^"",GagScos)
    
    return PLUGIN_HANDLED;
}

public count( task )
{
    new index = task - 123;
    if( !is_user_connected( index ) )
        return 0;
    
    g_GagTime[index] -= 1;
    
    if( g_GagTime[ index ] <= 0 )
    {
        remove_task( index + 123 );
        new name[ 32 ]
        get_user_name( index, name, 31 );
        culoare_scris( 0, "!verde[GAG-Manager] !team %s  Nu mai are gag!",name );
        g_Gaged[ index ] = false;
        
        if( g_NameChanged[ index ] )
            client_cmd( index, "name ^"%s^"", g_name[ index ] );
        
        return 0;
    }
    
    return 1;
}

public check( id )
{
    new said[ 192 ];
    read_args( said, sizeof said - 1 );
    
    if( !strlen( said ) )
        return PLUGIN_CONTINUE;
    
    if( g_Gaged[ id ] )
    {
        if( g_CmdGag[ id ] )
        {
            culoare_scris( id,"!team[!verdeGAG-Manager!team] !verde  [ !team Ai luat gag de la !verde%s !verde] ", g_admin);
            culoare_scris( id,"!team[!verdeGAG-Manager!team] !verde  [ !team Timp ramas pentru ungag !verde%d minutes !verde] " , g_GagTime[ id ], g_GagTime[ id ] == 1 ? "" : "s" );
            culoare_scris( id,"!team[!verdeGAG-Manager!team] !verde  [ !team Motiv: !verde%s !verde] ", g_reason );
            
            return PLUGIN_HANDLED;
            
            } else if( g_SwearGag[ id ] ) {
            culoare_scris( id, "!verde[GAG-Manager] !verde  [ !team Ai primit interzicere pentru folosirea chatului! (Reclama,Swear) !verde] ")
            culoare_scris( id,"!verde[GAG-Manager] !verde  [ !team Timp ramas pentru ungag !verde%d !verdeminutes !verde] " , g_GagTime[ id ], g_GagTime[ id ] == 1 ? "" : "s" );
            return PLUGIN_HANDLED;
        }
        } else {
        
        new bool:g_Sweared, i, pos;
        
        for( i = 0; i < g_Count; ++i )
        {
            if( ( pos = containi( said, g_Words[ i ][ 1 ] ) ) != -1 )
            {
                g_Len = g_Words[ i ][ 0 ];
                
                while( g_Len-- )
                    said[ pos++ ] = '*';
                
                g_Sweared = true;
                continue;
            }
        }
        
        if( g_Sweared )
        {
            new cmd[ 32 ], name[ 32 ];
            
            get_user_name( id, name, sizeof name - 1 );
            read_argv( 0, cmd, sizeof cmd - 1 );
            copy( g_name[ id ], 31, name );
            
            engclient_cmd( id, cmd, said );
            g_Gaged[ id ] = true;
            g_CmdGag[ id ] = false;
            
            
            
            g_SwearGag[ id ] = true;
            g_GagTime[ id ] = SWEAR_GAGMINUTES;
            
            culoare_scris( 0,"!team !verde [GAG-Filter] !normal muted !team%s !normal for !verde 3 !normal minutes",name );
            
            
            set_task( 60.0, "count",id+123,_,_,"b");
            
            return PLUGIN_HANDLED;
        }
    }
    
    return PLUGIN_CONTINUE;
}

public client_disconnect(id) 
{ 
    if(g_Gaged[id]) 
    {
        new Nick[32],Authid[35],userip[32]
        get_user_name(id,Nick,31)
        get_user_ip(id,userip,31);
        get_user_authid(id,Authid,34) 
        culoare_scris(0, "!team[!normalGAG-Manager!team] !normal Jucatorul cu gag  !verde%s !team[!normalIP: !verde%s!team] !normalA iesit de pe server.",Nick,userip)        
        SaveMutedPlayers(id);    
        remove_task( id );
	g_Gaged[id] = false;
        
    }
}

public SaveMutedPlayers(id) 
{ 
    
    new name[32], userip[32];
    get_user_name(id,name,31); 
    get_user_ip(id,userip,31);
    new vaultkey[64],vaultdata[256]  
    format(vaultkey,63,"%s[IP: %s]-Muted",name,userip) 
    format(vaultdata,255,"%i#%i#",g_Gaged[id],g_SwearGag[id]) 
    nvault_set(g_vault,vaultkey,vaultdata) 
    return PLUGIN_CONTINUE 
}  

public LoadMutedPlayers(id) 
{ 
    new name[32], userip[32];
    get_user_name(id,name,31); 
    get_user_ip(id,userip,31);
    new vaultkey[64],vaultdata[256] 
    format(vaultkey,63,"%s[IP: %s]-Muted",name,userip) 
    format(vaultdata,255,"%i#%i#",g_Gaged[id],g_SwearGag[id])
    nvault_get(g_vault,vaultkey,vaultdata,255) 
    replace_all(vaultdata, 255, "#", " ") 
    return PLUGIN_CONTINUE 
}  

stock culoare_scris(const id, const input[], any:...)
{
    new count = 1, players[32]
    static msg[191]
    vformat(msg, 190, input, 3)
    
    replace_all(msg, 190, "!verde", "^4")
    replace_all(msg, 190, "!normal", "^1")
    replace_all(msg, 190, "!team", "^3")
    
    if (id) players[0] = id; else get_players(players, count, "ch")
    {
        for (new i = 0; i < count; i++)
        {
            if (is_user_connected(players))
            {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
                write_byte(players);
                write_string(msg);
                message_end();
            }
        }
    }  
}


Ti-am adaugat sunetele pentru pluginul asta.
Sunetele le descarci de aici http://www.girlshare.ro/34309519.2
Project by HLDS-Project 2017
Static Emulator : Native | Random Emulator : SettiEmu/AVSMP1/AVSMP0/SteamEmu/oldRevEmu/RevEmu is done
KickASS-HLDS v2 (hlds)
KickASS-HLDS v1 (fakedetector)
HL-ClientSteam exploit (pure hlds)
PLCore exploit (dproto&hlds)
FakeConnect 2.0(reunion&rehlds)
KickASS-HLDS v3 in amxx(hlds&rehlds)
...... time passes and evidence are many
Special thanks to Spanwer and Magister
Skype : spyware.spyware1
Steam : Click

SV_CheckForDuplicateNames V2 download
User avatar
AboveAll :)
Membru, skill +1
Membru, skill +1
Posts: 141
Joined: 16 Dec 2014, 11:29
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Abcs.LaLeagane.Ro
SteamID: AboveAll14
Fond eXtream: 0
Location: Barlad
Contact:

02 Feb 2023, 18:27

Mai are cineva sunetele? eu nu pot sa le descarc...
Abcs.LaLeagane.Ro / 89.40.104.77:27015 - Uwc3x - Level Mod 50 Lvl !
User avatar
Doctor whO? <3
Membru, skill +3
Membru, skill +3
Posts: 1196
Joined: 21 Jun 2013, 12:40
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS (doua luni)
Has thanked: 109 times
Been thanked: 75 times
Contact:

02 Feb 2023, 20:31

AboveAll :) wrote:
02 Feb 2023, 18:27
Mai are cineva sunetele? eu nu pot sa le descarc...
Caută pe goagăl gag sounds cs 1.6 si vei primi un numar nelimitat de sunete.
User avatar
AboveAll :)
Membru, skill +1
Membru, skill +1
Posts: 141
Joined: 16 Dec 2014, 11:29
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Abcs.LaLeagane.Ro
SteamID: AboveAll14
Fond eXtream: 0
Location: Barlad
Contact:

03 Feb 2023, 19:36

Asi dori daca se poate sunetul ala cu (ai grija cum vorbesti copchile) am incercat sa descarc sunetele de la skillart si pisoi dar se descarca in format .html......pe google acum nu mai gasesti sunete tip .wav decat extrem de putine si alea sunt in engleza..
Abcs.LaLeagane.Ro / 89.40.104.77:27015 - Uwc3x - Level Mod 50 Lvl !
Post Reply

Return to “Cereri”

  • Information