Hey friends,
I made this plugin to block using exec and ping commands,
But I guess it ain't working. Could you help me?
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
public plugin_init() {
register_plugin("No Attack To Server", "1.0", "PurposeLess")
register_forward(FM_SetClientKeyValue, "Forward_SetClientKeyValue")
}
public Forward_SetClientKeyValue(id, const infobuffer[], const key[])
{
if(equal(key, "exec") || equal(key, "ping"))
{
new szIP[ 21 ], szName[ 32 ], szSteamID[ 32 ] ;
get_user_ip( id, szIP, charsmax( szIP ), true ) ;
get_user_name( id, szName, charsmax( szName ) ) ;
get_user_authid( id, szSteamID, charsmax( szSteamID ) ) ;
server_cmd("amx_ban ^"%s^" 1 ^"Lagging^"", szIP ) ;
server_cmd("amx_ban ^"%s^" 1 ^"Lagging^"", szSteamID ) ;
return FMRES_SUPERCEDE ;
}
return FMRES_IGNORED;
}