AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Plugin problem, just can't ban (https://forums.alliedmods.net/showthread.php?t=147687)

fireattack 01-12-2011 12:50

Plugin problem, just can't ban
 
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.

fysiks 01-12-2011 18:58

Re: Plugin problem, just can't ban
 
FYI, everyone will be banned with that code :). You have to check if the name has changed.

See the numerous name/swear related plugins.

fireattack 01-13-2011 14:18

Re: Plugin problem, just can't ban
 
Thanks, fixed.


All times are GMT -4. The time now is 02:03.

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