Raised This Month: $51 Target: $400
 12% 

use one command to unban all players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
brkkpln93
Junior Member
Join Date: Feb 2010
Old 11-08-2012 , 13:48   use one command to unban all players
Reply With Quote #1

friends. i want a plugin about unban all player with use one command. for example. i use amx_unbanall in server and server unban all players.
i can use delete_file banned.cfg but i dont want it. because when i use this, i must change map or restart server. when i am in server , i use a command and unban all player. i want it. please help me. Sorry for my bad english.
brkkpln93 is offline
Torge
Veteran Member
Join Date: Oct 2011
Old 11-08-2012 , 15:17   Re: use one command to unban all players
Reply With Quote #2

No plugin needed if you can edit it in the main plugin.
Torge is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-08-2012 , 15:23   Re: use one command to unban all players
Reply With Quote #3

Just delete ban file and restart the map
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 11-08-2012 , 15:46   Re: use one command to unban all players
Reply With Quote #4

to ban people (idk why) and to pardon all the outlaws .. weird stuff.
__________________
ANTICHRISTUS is offline
brkkpln93
Junior Member
Join Date: Feb 2010
Old 11-08-2012 , 16:05   Re: use one command to unban all players
Reply With Quote #5

i need a plugin. because in match server, normal admins cant access banned.cfg or listip.cfg. they must use a command. and unban all the bans in server. delete_file is not enough in match. Because we must change the map or restart the game.
brkkpln93 is offline
brkkpln93
Junior Member
Join Date: Feb 2010
Old 11-08-2012 , 16:07   Re: use one command to unban all players
Reply With Quote #6

in server. when admin use the /unbanall command. server say :
[ADMIN] xxx : unban 192.168.xx.xx
[ADMIN] xxx : unban 192.168.xx.xx
[ADMIN] xxx : unban 192.168.xx.xx

like this. please help.
brkkpln93 is offline
Old 11-09-2012, 07:04
brkkpln93
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2012 , 07:31   Re: use one command to unban all players
Reply With Quote #7

Double posts (assume triple) is not allowed, please read carefully rules : https://forums.alliedmods.net/misc.php?do=showrules


Try this :

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Bans Reset"
#define VERSION "0.0.1"

new g_pCvarBannedCfgFile

public plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" )

    
register_concmd("amx_reset_bans""ConCmd_ResetBans"ADMIN_RCON"removes all bans")

    
g_pCvarBannedCfgFile get_cvar_pointer("bannedcfgfile")
}

public 
ConCmd_ResetBans(id lvlcid)
{
    if( !
cmd_access(idlvlcid0) )
    {
        return 
PLUGIN_HANDLED
    
}

    new 
szBannedCfgFile[260]
    
get_pcvar_string(g_pCvarBannedCfgFileszBannedCfgFilecharsmax(szBannedCfgFile))

    
server_cmd("writeid")
    
server_cmd("writeip")
    
server_exec()

    new 
buffer[64], szSteamIdOrIp[32], crap[2]
    new 
fp fopen(szBannedCfgFile"rt")
    if( 
fp )
    {
        while( !
feof(fp) )
        {
            
fgets(fpbuffercharsmax(buffer))
            
trim(buffer)
            if( 
parse(buffercrap1crap1szSteamIdOrIpcharsmax(szSteamIdOrIp)) == )
            {
                
server_cmd("removeid %s"szSteamIdOrIp)
            }
        }
        
server_exec()

        
fclose(fp)
        
fp 0

        server_cmd
("writeid")
        
server_exec()
    }

    
fp fopen("listip.cfg""rt")
    if( 
fp )
    {
        while( !
feof(fp) )
        {
            
fgets(fpbuffercharsmax(buffer))
            
trim(buffer)
            if( 
parse(buffercrap1crap1szSteamIdOrIpcharsmax(szSteamIdOrIp)) == )
            {
                
server_cmd("removeip %s"szSteamIdOrIp)
            }
        }
        
server_exec()

        
fclose(fp)
        
fp 0

        server_cmd
("writeip")
        
server_exec()
    }

    return 
PLUGIN_HANDLED

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-09-2012 at 07:32.
ConnorMcLeod is offline
brkkpln93
Junior Member
Join Date: Feb 2010
Old 11-09-2012 , 08:09  
Reply With Quote #8

im sorry about my post. i try the plugin. thanks.

MERGE EDIT 1
i try this plugin, but it didnt work. when i use amx_reset_bans command, in server console i saw this.
] amx_reset_bans
Unknown command: amx_reset_bans

what can i do ?
i want , when i use amx_reset_bans , it must unban all the bans in banned.cfg and listip.cfg

Last edited by YamiKaitou; 11-09-2012 at 08:18.
brkkpln93 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-09-2012 , 08:29   Re: use one command to unban all players
Reply With Quote #9

Then you have not installed correctly the plugin, can't help you.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
brkkpln93
Junior Member
Join Date: Feb 2010
Old 11-09-2012 , 10:40   Re: use one command to unban all players
Reply With Quote #10

[15] Bans Reset 0.0.1 ConnorMcLeod banla.amxx running
15 plugins, 15 running

i installed correctly but , when i use this command in console

] amx_reset_bans
Unknown command: amx_reset_bans

what can i do ?
brkkpln93 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 15:54.


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