Raised This Month: $ Target: $400
 0% 

Plugin problem, just can't ban


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fireattack
Senior Member
Join Date: Jul 2008
Old 01-12-2011 , 12:50   Plugin problem, just can't ban
Reply With Quote #1

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
#include < cstrike >
 
new changenicks33 ]
 
public 
plugin_init( )
{
     
register_plugin"Antiflood Nick""1.0""ExTr" )
 
     
register_forwardFM_ClientUserInfoChanged"FWClientUserInfoChanged" )
}
 
public 
client_putinserverid )
{
     
changenicksid ] = 0
     bucle
id )
}
 
public 
client_disconnectid )
{
     
changenicksid ] = 0
}
 
public 
FWClientUserInfoChangedid 
{
     
changenicksid ] ++
}
 
public 
bucleid )
{
     if( !
is_user_connectedid ) )
          return 
PLUGIN_HANDLED
 
     
if( changenicksid ] >= )
     {
         
server_cmd"amx_ban #%d 5 ^"Nick flood is not allowed.^""get_user_useridid ) )
     }
     else
     {
         
changenicksid ] = 0
     
}
 
      
set_task10.0"bucle"id )
 
      return 
PLUGIN_CONTINUE

I know there are better ways to do this, but I want to know why this don't run, thanks.

Last edited by fireattack; 01-12-2011 at 12:53.
fireattack is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-12-2011 , 18:58   Re: Plugin problem, just can't ban
Reply With Quote #2

FYI, everyone will be banned with that code . You have to check if the name has changed.

See the numerous name/swear related plugins.
__________________
fysiks is offline
fireattack
Senior Member
Join Date: Jul 2008
Old 01-13-2011 , 14:18   Re: Plugin problem, just can't ban
Reply With Quote #3

Thanks, fixed.
fireattack is offline
Reply



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 02:03.


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