lockLocked

[REZOLVAT] Plugin anti fake players

person Master.
schedule Sep 23, 2017
forum 8
visibility 41
Sep 23, 2017 at 7:50 PM
Original Post
#1
Member

•Plugin cerut: Anti fake playeri

•Serverul pentru care doresc pluginul:RW.ECILA.RO

•Alte detalii tehnice despre plugin: sa mearga 100%

•Poze:-

Sep 23, 2017 at 8:00 PM
#2
Member

Incearca o protectie un exemplu:wargods(Daca ai hzone nu o sa mearga ), R4GE Guard, Krond(trebuie sa ai host la krond/zeroping), etc.

Sep 23, 2017 at 8:05 PM
#3
Member

Ma scuzati ca intervin. Dar de vre-o zile imi sunt trimisi niste booti pe server si fac reclama gen connect rangezo**** Am bagat aadvanced gag dar degeaba.

Sep 23, 2017 at 8:06 PM
#4
Member

Adauga in gag_words.ini reclama

Sep 23, 2017 at 8:09 PM
#5
Member

drayen intra pe skype

Sep 23, 2017 at 9:21 PM
#6
Member

Nu încăcați svu cu rahaturi de „protecții”, sunt variante mult mai simple!

Recomand așa :

 

 

SAU 

 

Spoiler

#include <amxmodx>

static const
   PLUGIN[] = "/chat",
   VERSION[] = "1.0",
   AUTHOR[] = "scosmyn";

new buffer2[33][30],bool:bChat[33]

public plugin_init() {
   register_plugin(PLUGIN,VERSION,AUTHOR)

   register_clcmd("say","cmdSay")
   register_clcmd("say_team","cmdSay")
}
public cmdSay(id) {
	new szArgs[192]
	read_args(szArgs,charsmax(szArgs))
	remove_quotes(szArgs)
	
	if(equal(szArgs,buffer2[id]) && bChat[id])
	{
		bChat[id] = false
		color(id,"!teamTocmai ai deblochat chat-ul!")
		return 1
	}
	else if(!equal(szArgs,buffer2[id]) && bChat[id])
	{
		color(id,"!teamPentru a debloca chat-ul scrie urmator-ul cod: !g%s",buffer2[id])
		return 1
	}
	return 0
}

public client_putinserver(id) {
	new buffer[30],i,random_words
	
	new const szWords[] =
	{
		"a","b","c","d",
		"e","f","g","h",
		"i","j","k","l",
		"m","n","o","p",
		"q","r","s","t",
		"u","v","w","x",
		"y","z"
	}
	random_words = random_num(5,8)
	for(i = 0; i < random_words; i++)
		add(buffer,charsmax(buffer),szWords[random_num(0,sizeof(szWords) -1)])
	
	copy(buffer2[id],charsmax(buffer2),buffer)
	bChat[id] = true
}

stock color( const id, const input[ ], any:... )
{
   new count = 1, players[ 32 ]

   static msg[ 191 ]
   vformat( msg, 190, input, 3 )

   replace_all( msg, 190, "!g", "^4" ) //- verde
   replace_all( msg, 190, "!y", "^1" ) //- galben
   replace_all( msg, 190, "!team", "^3" ) //- echipa
   replace_all( msg, 190, "!n", "^0" ) //- normal

   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( );
         }
      }
   }
}

 

 

Spoiler

#include <amxmodx>
     
    #define PLUGIN "Block Chat"
    #define VERSION "1.0"
     
     
    // --| CC_ColorChat.
    enum Color
    {
       NORMAL = 1,       // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
       GREEN,          // Culoare Verde.
       TEAM_COLOR,       // Culoare Rosu, Albastru, Gri.
       GREY,          // Culoarea Gri.
       RED,          // Culoarea Rosu.
       BLUE,          // Culoarea Albastru.
    };
     
    new TeamName[  ][  ] =
    {
       "",
       "TERRORIST",
       "CT",
       "SPECTATOR"
    };
    // --| CC_ColorChat.
     
    // --| Tag-ul mesajului din chat.
    new const g_szTag[ ] = "[Anti Spam]";
    // --| ---------------------------------
     
    // --| Cate secunde este blocat chat`ul.
    new const Float:g_fNoFloodSeconds = 4.0;
    // --| ---------------------------------
     
    // --| Cate secunde este blocat chat`ul ( x secunde de la conectare ).
    new const Float:g_fBlockedSeconds = 25.0;
    // --| ---------------------------------
     
    // --| De aici e treaba mea .
    new Float:g_fGameTime[ 33 ];
    new Float:g_fGameTimeSecond[ 33 ];
     
    public plugin_init( )
    {
       register_plugin( PLUGIN, VERSION, "Askhanar" );
       
       register_clcmd( "say","ClCmdSayOrSayTeam" );
       register_clcmd( "say_team","ClCmdSayOrSayTeam" );
       
       // Add your code here...
    }
     
    public client_connect( id )
    {
       g_fGameTime[ id ] = get_gametime( ) + g_fBlockedSeconds;
       g_fGameTimeSecond[ id ] = 0.0;
    }
     
    public client_disconnect( id )
    {
       g_fGameTime[ id ] = 0.0;
       g_fGameTimeSecond[ id ] = 0.0;
    }
     
    public ClCmdSayOrSayTeam( id )
    {
       static Float:fGameTime;
       fGameTime = get_gametime( );
       
       if( g_fGameTime[ id ] > fGameTime && ~get_user_flags(id) & ADMIN_KICK )
       {
         
          ColorChat( id, RED, "^x04%s^x01 Doar ce te-ai conectat pe server, asteapta^x03 %.1f^x01 secunde !", g_szTag, g_fGameTime[ id ] - fGameTime );
          return PLUGIN_HANDLED;
       }
       else if( g_fGameTimeSecond[ id ] > fGameTime && ~get_user_flags(id) & ADMIN_KICK )
       {
          ColorChat( id, RED, "^x04%s^x01 Asteapta^x03 %.1f^x01 secunde pentru a putea scrie din nou !", g_szTag, g_fGameTimeSecond[ id ] - fGameTime );
          return PLUGIN_HANDLED;
       }
       
       g_fGameTimeSecond[ id ] = fGameTime + g_fNoFloodSeconds;
       
       return PLUGIN_CONTINUE;
       
    }
     
    // --| CC_ColorChat.
    ColorChat(  id, Color:iType, const msg[  ], { Float, Sql, Result, _}:...  )
    {
       
       // Daca nu se afla nici un jucator pe server oprim TOT. Altfel dam de erori..
       if( !get_playersnum( ) ) return;
       
       new szMessage[ 256 ];
     
       switch( iType )
       {
           // Culoarea care o are jucatorul setata in cvar-ul scr_concolor.
          case NORMAL:   szMessage[ 0 ] = 0x01;
         
          // Culoare Verde.
          case GREEN:   szMessage[ 0 ] = 0x04;
         
          // Alb, Rosu, Albastru.
          default:    szMessage[ 0 ] = 0x03;
       }
     
       vformat(  szMessage[ 1 ], 251, msg, 4  );
     
       // Ne asiguram ca mesajul nu este mai lung de 192 de caractere.Altfel pica server-ul.
       szMessage[ 192 ] = '^0';
       
     
       new iTeam, iColorChange, iPlayerIndex, MSG_Type;
       
       if( id )
       {
          MSG_Type  =  MSG_ONE_UNRELIABLE;
          iPlayerIndex  =  id;
       }
       else
       {
          iPlayerIndex  =  CC_FindPlayer(  );
          MSG_Type = MSG_ALL;
       }
       
       iTeam  =  get_user_team( iPlayerIndex );
       iColorChange  =  CC_ColorSelection(  iPlayerIndex,  MSG_Type, iType);
     
       CC_ShowColorMessage(  iPlayerIndex, MSG_Type, szMessage  );
         
       if(  iColorChange  )   CC_Team_Info(  iPlayerIndex, MSG_Type,  TeamName[ iTeam ]  );
     
    }
     
    CC_ShowColorMessage(  id, const iType, const szMessage[  ]  )
    {
       
       static bool:bSayTextUsed;
       static iMsgSayText;
       
       if(  !bSayTextUsed  )
       {
          iMsgSayText  =  get_user_msgid( "SayText" );
          bSayTextUsed  =  true;
       }
       
       message_begin( iType, iMsgSayText, _, id  );
       write_byte(  id  );      
       write_string(  szMessage  );
       message_end(  );
    }
     
    CC_Team_Info( id, const iType, const szTeam[  ] )
    {
       static bool:bTeamInfoUsed;
       static iMsgTeamInfo;
       if(  !bTeamInfoUsed  )
       {
          iMsgTeamInfo  =  get_user_msgid( "TeamInfo" );
          bTeamInfoUsed  =  true;
       }
       
       message_begin( iType, iMsgTeamInfo, _, id  );
       write_byte(  id  );
       write_string(  szTeam  );
       message_end(  );
     
       return 1;
    }
     
    CC_ColorSelection(  id, const iType, Color:iColorType)
    {
       switch(  iColorType  )
       {
         
          case RED:   return CC_Team_Info(  id, iType, TeamName[ 1 ]  );
          case BLUE:   return CC_Team_Info(  id, iType, TeamName[ 2 ]  );
          case GREY:   return CC_Team_Info(  id, iType, TeamName[ 0 ]  );
     
       }
     
       return 0;
    }
     
    CC_FindPlayer(  )
    {
       new iMaxPlayers  =  get_maxplayers(  );
       
       for( new i = 1; i <= iMaxPlayers; i++ )
          if(  is_user_connected( i )  )
             return i;
       
       return -1;
    }

 

Spoiler

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Anti spam"
#define VERSION "1.0"

new g_szExceptions[][] = {
	"/shop",
	"shop"
	//Aici poti sa iti adaugi tu ce comenzi mai vrei
}
new g_szLastMsg[33][64];
public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, "FaTzZu")
	
	register_clcmd("say","HookClCmdSay");
	register_clcmd("say_team","HookClCmdSay");
}
public HookClCmdSay( id )
{
	static szChat[ 192 ]
	read_args( szChat, charsmax( szChat ) );
	remove_quotes( szChat );
	
	if(equali(szChat,g_szLastMsg[id]))
	{
		for(new i; i < charsmax(g_szExceptions); i++)
		{
			if(containi(szChat, g_szExceptions[i]) == -1)
			{
				client_print(id, print_chat, "Nu poti scrie de 2 ori acelasi mesaj !");
				return PLUGIN_HANDLED;
			}
		}
	}
	copy(g_szLastMsg[id] , 63 , szChat);
	return PLUGIN_HANDLED;
}
Sep 24, 2017 at 10:20 AM
#7
Member

Ai rezolvat problema?

Sep 24, 2017 at 10:23 AM
#8
Member

nu,acuma ma ocup cu un addons.

Sep 24, 2017 at 10:25 AM
#9
Member

Daca nu ai rezolvat slabe sanse da-mi pm pe forum/skype.

Cerere marcata ca Rezolvata

@locked

This archived topic is read-only.