RSSy MYGO.pl Opublikowano Sierpień 30, 2020 o 07:21 RSSy Udostępnij Opublikowano Sierpień 30, 2020 o 07:21 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 banned.cfg file");}public CmdBanList(id,level,cid){ if(!cmd_access(id,level,cid,1)) return 1 new Search[32]; read_args(Search, 31); 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(Data, Arg1, 100, Arg2, 100, Arg3, 100, Arg4, 100, Arg5, 100, Arg6, 100); 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} Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi