Raised This Month: $36 Target: $400
 9% 

[REQ] edit plugin amx_banlist


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
@LeX
Junior Member
Join Date: Nov 2018
Old 08-30-2020 , 04:21   [REQ] edit plugin amx_banlist
Reply With Quote #1

hi, i recently encountered a problem on the server, more precisely, a problem with the banlist of the 'advanced bans' plugin.

i would like to change it, so that the admins can search for a ban in the banlist by the player's name.

after a few searches i found something here but only for banned.cfg
i edited a little and i faced a small problem, not all bans are displayed.
i want them to show me all the bans that contain what i was searching.

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

public plugin_init()
{
    
register_plugin("AMXX Ban List Viewer","0.1a","Drak");
    
    
register_concmd("amx_banlist","CmdBanList",ADMIN_BAN,"Views the users in the advanced_bans.txt file");
}

public 
CmdBanList(id,level,cid)
{
    if(!
cmd_access(id,level,cid,1))
        return 
1
        
    
new Search[32];
    
read_args(Search31);
    
    new 
pFile fopen("addons/amxmodx/data/advanced_bans.txt","r");
    if(!
pFile)
        return 
client_print(id,print_console,"[AMXX BanList] Unable to open BanList File.");
    
    new 
Data[256],Arg1[101],Arg2[101],Arg3[101],Arg4[101],Arg5[101],Arg6[101];
    
    while(!
feof(pFile))
    {
        
fgets(pFile,Data,255);
        if(
contain(Data,Search) != -1)
        {
            
parse(DataArg1100Arg2100Arg3100Arg4100Arg5100Arg6100);
            
console_print(id"************************************");
            
console_print(id"Name: %s"Arg2);
            
console_print(id"IP/SteamID: %s"Arg1);
                
            if(
equal(Arg3"0") && !equal(Arg3"0"))
                
replace(Arg3,100,"0","Temporar"); 
            else 
replace(Arg3,100,"0","Permanent");
                
            
console_print(id"Ban Type: %s"Arg3);
            
console_print(id"Unban Time: %s"Arg4);
            
console_print(id"Reason: %s",Arg5);
            
console_print(id"Admin: %s"Arg6);
            
console_print(id"************************************");
            return 
1;
        }
    }
    
fclose(pFile);
    return 
1


Last edited by @LeX; 08-30-2020 at 07:43.
@LeX is offline
@LeX
Junior Member
Join Date: Nov 2018
Old 08-31-2020 , 15:07   Re: [REQ] edit plugin amx_banlist
Reply With Quote #2

up
@LeX is offline
@LeX
Junior Member
Join Date: Nov 2018
Old 09-01-2020 , 23:35   Re: [REQ] edit plugin amx_banlist
Reply With Quote #3

a little help please ? ...

Last edited by @LeX; 09-01-2020 at 23:35.
@LeX is offline
@LeX
Junior Member
Join Date: Nov 2018
Old 09-03-2020 , 13:15   Re: [REQ] edit plugin amx_banlist
Reply With Quote #4

T/C please, no interest

thank you ... yes ... thank you
@LeX is offline
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 05:23.


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