Raised This Month: $ Target: $400
 0% 

Exec And Ping Command


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 06-28-2017 , 09:00   Exec And Ping Command
Reply With Quote #1

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;

PurposeLessx is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-28-2017 , 09:34   Re: Exec And Ping Command
Reply With Quote #2

"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.
__________________

Last edited by fysiks; 06-28-2017 at 19:35.
fysiks is online now
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 06-28-2017 , 10:18   Re: Exec And Ping Command
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Because neither one of those commands is actually sent to the server.
ping command is handled by the server.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-28-2017 , 09:57   Re: Exec And Ping Command
Reply With Quote #4

Theres already aplugin that kicks laggers..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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