/* フィルターのロード個数を増やす暫定処置 4:20 2008/11/23 作成 */ /*----------------------------------------------------------------------------*- フィルターの拡張ロード スクリプト [ Util_expansion_filters.pwn ] 0.2Xになり、フィルターの初期ロード数が16になったため 暫定的にロード個数を上げるべく、チャレンジしたもの。 注意 : このスクリプトではロード数を増やせません。 0.3で、修正されたらいいのですが…。 -*----------------------------------------------------------------------------*/ #include #define SCRIPT_NAME "util_expansion_filters.amx" #define LOAD_TYPE "load" #define UNLOAD_TYPE "Unload" enum SCRLIST { Scrname[256] } new Scriptlist[][Scrname] = { /* 使っているスクリプトを列挙していってください。 "フィルタースクリプトの名前", */ "util_server", "util_admin", "util_vehicles", "util_objects", "util_teleport", "util_state", "adminspec", "actions", "olddance" // 最後はコンマ無し }; public OnFilterScriptInit() { Loadscrlist(); new string[256]; format(string, sizeof(string), "Reload %s", SCRIPT_NAME); SendClientMessageToAll(0x00EEADDF, string); return 1; } public OnFilterScriptExit() { Unloadscrlist(); new string[256]; format(string, sizeof(string), "Unload %s", SCRIPT_NAME); SendClientMessageToAll(0x00EEADDF, string); return 1; } forward Loadscrlist(); public Loadscrlist() { for(new i = 0; i < Scriptlist[i][Scrname]; i++) { new tmp[256]; tmp = LOAD_TYPE; strcat(tmp, "fs"); strcat(tmp, " "); strcat(tmp, Scriptlist[i][Scrname]); SendRconCommand(tmp); } return 1; } forward Unloadscrlist(); public Unloadscrlist() { for(new i = 0; i < Scriptlist[i][Scrname]; i++) { new tmp[256]; tmp = UNLOAD_TYPE; strcat(tmp, "fs"); strcat(tmp, " "); strcat(tmp, Scriptlist[i][Scrname]); SendRconCommand(tmp); } return 1; }