RSSy MYGO.pl Opublikowano Sierpień 9, 2019 o 23:00 RSSy Udostępnij Opublikowano Sierpień 9, 2019 o 23:00 About: Provides a config to specify which VScript files to override. You can replace the whole script or search and replace specific strings. Supports RegEx matching for filenames and for matching strings within the VScripts. Currently supports: CS:GO and L4D2. Can be extended to other games which use VScripts. Please request if required. Some games or maps will have embedded and possibly encrypted scripts preventing any reasonable method to modify them. This plugin makes that happen. Thanks: "Peace-Maker" - Fixing dHooks SetParamString. "Lux" - Testing "Dragokas" - Testing "Mr. Man" - Testing Admin Commands: Requires "z" - ADMFLAG_ROOT flag PHP Code: sm_vs_dump // Dumps all found VScripts from the servers /scripts/vscripts/ file system to /scripts/vscripts/vscripts_dump/. Automatically decodes if required. sm_vs_encrypt // Usage: sm_vs_encrpt <filename.nut>. Encode the specified script, must be inside the servers /scripts/vscripts/ folder, include the extension. sm_vs_file // Usage: sm_vs_file <filename>. Extracts the specified VScript from the Valve file system to the servers /scripts/vscripts/vscripts_dump/ folder. Automatically decodes if required. sm_vs_list // Show data config tree of modified scripts for the current map. sm_vs_reload // Reloads the data config. This also replaces files in the override folder. ConVars: PHP Code: // VScript File Replacer plugin version. vscript_replacer_version Config: Plugin data config saved to \addons\sourcemod\data\vscripts_override.cfg. Here is an example demonstrating various features and techniques. Spoiler PHP Code: // When a script is replaced they are saved to your servers /scripts/vscripts/vscripts_overrides/ folder. // Do not save files there, they will be overwritten. // The extension ".nut" or ".nuc" shouldn't be added to any keyvalue data. // This is an example script with comments on the features provided, delete the sections you don't need. // For L4D2 I recommend keeping the "jukebox_dlc1", "jukebox_main" and "helms_deep" sections. "vscript_replacer" { // /* CS:GO + ANY: delete the // on this line to comment out everything and start from fresh. // All maps ".+" { // L4D2: No more jukebox debug spam! "jukebox_dlc1" { // Find and replace the string literally, you must always escape any quotes or backslashes: " with \" and \ with \\ // Strings must be less than 8192 characters. Use the file "override" keyvalue for anything longer. "DBG <- ::JUKEBOX_DEBUG <- true" "DBG <- ::JUKEBOX_DEBUG <- false" } // CS:GO test: script_execute birds/birdspawner; "birds/birdspawner" { "m_bIsBirdSpawner <- true;" "m_bIsBirdSpawner <- true; printl(\"BIRD WATCHING\");"; } } // Map name to activate on. Supports RegEx matching. For RegEx testing use: https://regex101.com/ or any similar site. // This matches "c1m1_" to "c99m99_" for example, all Valve maps in L4D2. "c[0-9]m[0-9]_.+" { // VScript filename to override, searches the Valve file system and gamedir. // This matches the script "some_vscript_file". "some_vscript_file" { // The "override" key is reserved for replacing the whole VScript file with a custom one, if both files exist. // The specified value must point to a filename in your servers /scripts/vscripts/vscripts_custom/ folder. // The file is copied to the your servers /scripts/vscripts/vscripts_override/ folder. "override" "my_vscript_file" // Can still use other keys to find and replace strings within the override file. "some_random_var = false;" "some_random_var = true;" } } // L4D2: This map created by a megalomaniac. It used to execute the "KillServer" command when detecting MetaMod or SourceMod. // Why block the communities plugins? We will always reverse. "helms_deep" { "helms_deep_.+_survival" { // Script name will be matched with RegEx. // 1=RegEx match script name. 2=RegEx search string for replacement. 3=Use RegEx for both. Delete line to not use RegEx. "regex" "3" // Replace all string occurrences // These were removed from the latest versions of the map, however kept here in-case they return. "metamod_version" "metamod_working" // Makes the Helms Deep VScript search for the wrong cvar "sourcemod_version" "sourcemod_working" // Preventing the VScript from executing KillServer command. // RegEx replace all matched SteamIDs with Gabe's SteamID. "(STEAM_[0-5]:[0-1]:[0-9]+)" "STEAM_1:0:11101" // Your donators can fuck off too. } } } Changes: Code: 1.0 (10-Aug-2019) - Initial release. Requirements: DHooks (Experimental Dynamic Detour support) - Version: 2.2.0-detours8 - 03.08.2019 Installation: Download the .zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder. Attached Files vscript_replacer.zip (27.5 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto
Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.
Zarejestruj nowe konto
Załóż nowe konto. To bardzo proste!
Zarejestruj sięZaloguj się
Posiadasz już konto? Zaloguj się poniżej.
Zaloguj się