slay /kick /ban si din alea din chat. Nu tre sa mai intri in consola. Foarte folositor.
Made by annak1n
Citat:
/*
Plugin made by aNNakin for CFG COMMUNITY
Visit
[Trebuie sa fiti inscris si conectat pentru a vedea acest link] for more plugin by CFG Team
*/
#include < amxmodx >
#define PLUGIN "CFG Slash"
#define VERSION "1.0"
#define AUTHOR "aNNakin"
new const g_Char[ ] = "/";
new g_Commands[ ][ ] =
{
"/kick",
"/slay",
"/slap",
"/ban",
"/banip",
"/gag",
};
new g_Accesses[ ] =
{
ADMIN_KICK,
ADMIN_SLAY,
ADMIN_SLAY,
ADMIN_BAN,
ADMIN_BAN,
ADMIN_SLAY,
};
public plugin_init ( )
{
register_plugin ( PLUGIN, VERSION, AUTHOR );
register_clcmd ( "say", "hook_say" );
}
public hook_say ( e_Index )
{
static s_Args[ 192 ], s_Command[ 192 ];
read_args ( s_Args, charsmax ( s_Args ) );
if ( ! s_Args[ 0 ] )
return PLUGIN_CONTINUE;
remove_quotes ( s_Args[ 0 ] );
for ( new i; i < sizeof g_Commands; i++ )
{
if ( equal ( s_Args, g_Commands[ i ], strlen ( g_Commands[ i ] ) ) )
{
if ( get_user_flags ( e_Index ) & g_Accesses[ i ] )
{
replace ( s_Args, charsmax ( s_Args ), g_Char, "" );
formatex ( s_Command, charsmax ( s_Command ),"amx_%s", s_Args );
client_cmd ( e_Index, s_Command );
}
break;
}
}
return PLUGIN_CONTINUE;
}