as i sed is it possible to fuse this three plugins because they are great anti advertisment plugins
1st plugin
Code:
#include < amxmodx >
enum
{
CHECK_NO,
CHECK_FIRST,
CHECK_CHANGE
};
#define MAX_PLAYERS 32
new const g_szNameKey[ ] = "name";
new const g_szDefaultName[ ] = "Player";
new pCvar_MaxNameDigits;
new g_iCheckStatus[ MAX_PLAYERS + 1 ];
public plugin_init( )
{
register_plugin( "Max Name Digits", "0.0.1", "Exolent" );
pCvar_MaxNameDigits = register_cvar( "max_name_digits", "13" );
}
public client_putinserver( iPlayer )
{
g_iCheckStatus[ iPlayer ] = CHECK_FIRST;
new szName[ 32 ];
get_user_name( iPlayer, szName, charsmax( szName ) );
if( !IsNameValid( szName ) )
{
set_user_info( iPlayer, g_szNameKey, g_szDefaultName );
}
g_iCheckStatus[ iPlayer ] = CHECK_CHANGE;
}
public client_disconnect( iPlayer )
{
g_iCheckStatus[ iPlayer ] = CHECK_NO;
}
public client_infochanged( iPlayer )
{
if( g_iCheckStatus[ iPlayer ] == CHECK_CHANGE )
{
static szNewName[ 32 ], szOldName[ 32 ];
get_user_name( iPlayer, szOldName, charsmax( szOldName ) );
get_user_info( iPlayer, g_szNameKey, szNewName, charsmax( szNewName ) );
if( !equal( szNewName, szOldName )
&& !IsNameValid( szNewName ) )
{
set_user_info( iPlayer, g_szNameKey, szOldName );
}
}
}
bool:IsNameValid( const szName[ ] )
{
new iCount;
new iMax = get_pcvar_num( pCvar_MaxNameDigits );
new i = -1;
while( szName[ ++i ] )
{
if( '0' <= szName[ i ] <= '9' )
{
if( ++iCount >= iMax )
{
return false;
}
}
}
return true;
}
2. plugin
Code:
#include <amxmodx>
#define PLUGIN "resname"
#define VERSION "1.0"
#define AUTHOR ""
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public client_connect(id)
{
new name[32]
get_user_name(id, name, 31)
check_name(id, name)
}
public client_infochanged(id)
{
new name[32]
get_user_info(id, "name", name, 31)
check_name(id, name)
}
kick(id)
{
server_cmd("kick #%d ^"Ovde nemozes da Reklamiras promeni nik pa udji^"", get_user_userid(id))
}
check_name(id, name[])
{
if(containi(name, "www.") != -1 || containi(name, ".ro") != -1 || containi(name, ".com") != -1 || containi(name, ".net") != -1 || containi(name, ".org") != -1 || containi(name, ".uk") != -1)
{
kick(id)
return
}
new i, c
while((c = name[i++]))
{
switch(c)
{
case 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 64, 94, 123, 125:
{
kick(id)
return
}
}
}
}
3rd plugin
Code:
#include < amxmodx >
new pCvar_MaxSayDigits;
public plugin_init( )
{
register_plugin( "Max Say Digits", "0.0.1", "Exolent" );
register_clcmd( "say", "CmdSay" );
register_clcmd( "say_team", "CmdSay" );
pCvar_MaxSayDigits = register_cvar( "max_say_digits", "13" );
}
public CmdSay( iPlayer )
{
new szMessage[ 194 ];
read_args( szMessage, charsmax( szMessage ) );
remove_quotes( szMessage );
new iCount;
new iMax = get_pcvar_num( pCvar_MaxSayDigits );
new i = -1;
while( szMessage[ ++i ] )
{
if( '0' <= szMessage[ i ] <= '9' )
{
if( ++iCount >= iMax )
{
client_print( iPlayer, print_chat, "Botu nemozes ovde da reklamiras ", iMax, iMax == 1 ? "" : "s" );
return PLUGIN_HANDLED;
}
}
}
return PLUGIN_CONTINUE;
}
Please fuse this tree plugins , Exolent you can help me these are your plugins please