/* This stuff is free, but some functions should stay invisible for many, many eyes. Really many. While you don`t know how it really works, it works. Yep. Its true. You need also: BanConfigUtil version >= 1.01 Contact @ http://amxx.pl */ /* * Compilation Options * * If want use it delete // from next line and put exbancfg filename on top of plugins list (plugins.ini) */ //Replace standard ban menu #define OVERRIDE_BANMENU //add edition menu - slow thing, but could be usefull #define EDIT_MENU /* * Code */ #include #include #include #include #define PLUGIN "*ExtremeBanConfig" #define VERSION "3.02" #define AUTHOR "R3X&Miczu&Luk" #define MAX_PLAYERS 32 #define TASKID_LOADING 453456 #define Keysunbancfg (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<9) #define ADMIN_ACCESS ADMIN_BAN //Config Files #define CFG_FILE__TIMES "exban/bs_times.ini" #define CFG_FILE__REASONS "exban/bs_reasons.ini" //Buffer new gszCfgFile[128]; new gszPrefix[32]; new bool:gbDebug; new gszCfgid[33][CFGID_LEN]; new bool:gbIsSteam[33]; new gcvarMySQL; new gcvarHUDMsg, gcvarSteamSup; new gcvarSQLHost, gcvarSQLUser, gcvarSQLPass, gcvarSQLDB, gcvarSQLPrefix; new Handle:gTuple; //PlayerMenu new g_Players[MAX_PLAYERS], g_playerCount; new mcbPlayers; new g_SelectedTime[MAX_PLAYERS+1];//buffer new g_Target[MAX_PLAYERS+1];//buffer new mTime, mReason; #if defined EDIT_MENU #define CLEAR_EDIT_STATE(%1) client_cmd(%1, "amx_bancfg_editmenu ^"^"") new gszEditCfgid[33][CFGID_LEN]; new gszQuery[512]; new mBanned, mAllPlayers, mLast; new giBanned[33], giAllPlayers[33], giLast[33]; new mGroupOfPlayers; new giUnbanUser = 0; new giUnbanLastSelected = -1; #endif public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); gbDebug = (plugin_flags () & AMX_FLAG_DEBUG > 0); if(gbDebug) log_amx("------DEBUG SESSION------"); register_dictionary("admincmd.txt"); register_dictionary("adminhelp.txt"); register_dictionary("common.txt"); register_dictionary("extreme_ban3.txt"); register_concmd("amx_bancfg_savesettings", "cmdSaveSettings", ADMIN_ACCESS, ": save ConfigFile on server"); register_concmd("amx_bancfg", "cmdBanCfg", ADMIN_ACCESS, "<#userid,nick,cfgid> [powod] [kick]"); register_concmd("amx_unbancfg", "cmdUnBanCfg", ADMIN_ACCESS, ""); register_clcmd("amx_bancfg_pmenu","cmd_amx_banshot_pmenu", ADMIN_ACCESS, " : bancfg Menu"); register_clcmd("amx_bancfg_menu","cmd_amx_banshot_menu", ADMIN_ACCESS, "<#userid, nick>"); #if defined OVERRIDE_BANMENU register_clcmd("amx_banmenu","cmd_amx_banshot_pmenu",ADMIN_ACCESS); #endif register_clcmd("bancfg_custom_time","cmd_custom_time",ADMIN_ACCESS,"