AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Exec And Ping Command (https://forums.alliedmods.net/showthread.php?t=298976)

PurposeLessx 06-28-2017 09:00

Exec And Ping Command
 
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 
szIP21 ], szName32 ], szSteamID32 ] ;

        
get_user_ipidszIPcharsmaxszIP ), true ) ;
        
get_user_nameidszNamecharsmaxszName ) ) ;
        
get_user_authididszSteamIDcharsmaxszSteamID ) ) ;

        
server_cmd("amx_ban ^"%s^" 1 ^"Lagging^""szIP ) ;
        
server_cmd("amx_ban ^"%s^" 1 ^"Lagging^""szSteamID ) ;
        return 
FMRES_SUPERCEDE ;
    }
    return 
FMRES_IGNORED;



fysiks 06-28-2017 09:34

Re: Exec And Ping Command
 
"exec" is not actually sent to the server. Therefore, you can't prevent it from being used. If you could, it's pointless anyways because it doesn't protect you from anything.

Natsheh 06-28-2017 09:57

Re: Exec And Ping Command
 
Theres already aplugin that kicks laggers..

PRoSToTeM@ 06-28-2017 10:18

Re: Exec And Ping Command
 
Quote:

Originally Posted by fysiks (Post 2532216)
Because neither one of those commands is actually sent to the server.

ping command is handled by the server.


All times are GMT -4. The time now is 22:57.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.