RSSy MYGO.pl Opublikowano Sierpień 9, 2022 o 10:31 RSSy Udostępnij Opublikowano Sierpień 9, 2022 o 10:31 [ANY] Language Selector A plugin that allows players to select the language they want SourceMod to translate text into. Translations must be provided by plugins for this to have any effect on them. Requires at least SourceMod 1.11. FeaturesConfigurable menu (modify sourcemod/configs/langselect.cfg and the auto-generated cfg/sourcemod/plugin.langselect.cfg). Saves player language setting across sessions (can be turned off). Optional prompt for new players to select a language (either ask once, or ask until they select something). Full and absolutely overkill translation support. How to install See the releases tab on GitHub for the latest download. Or download the one attached to the post (which could be out of date if I forget to update it). Download and extract the archive into addons/sourcemod/ After loading for the first time, cfg/sourcemod/plugin.langselect.cfg will be generated and can then be configured. If upgrading, remember the auto-generated config file may need to be deleted (but only if new ConVars were added). Commands Like all sm_ commands you can use ! or / too, like !language or /language PHP Code: // Set your own SourceMod translation language. // Not specifying a country code will open the menu. // Access: Everyone sm_language <Country Code> or sm_language sm_lang <Country Code> or sm_lang // Get a player's SourceMod translation language. // Access: Admin_Generic sm_getlanguage <Target> sm_getlang <Target> // Set a player's SourceMod translation language. // Access: Admin_Ban sm_setlanguage <Target> <Country Code> sm_setlang <Target> <Country Code> // Reset a player's SourceMod translation language. // Access: Admin_Ban sm_resetlanguage <Target> sm_resetlang <Target> ConVars PHP Code: // Allow custom language codes with "sm_language <Code>". // If 0, only codes available in the config (or the built-in list if config is disabled) are permitted. // - // Default: "0" // Minimum: "0.000000" // Maximum: "1.000000" langselect_allow_custom "0" // Show a "Reset Language" option on the menu. // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" langselect_allow_reset "1" // Location of the Language Selector config file (relative to the SourceMod directory). // - // Default: "configs/langselect.cfg" langselect_config "configs/langselect.cfg" // How should the language selection prompt show to a new player. // 0 - On each respawn until a language is selected. // 1 - Only once per session. // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" langselect_prompt_once "1" // Should a player's selected language be saved. // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" langselect_save "1" // Ask new players to select a language when they spawn. // - // Default: "0" // Minimum: "0.000000" // Maximum: "1.000000" langselect_show_prompt "0" // Should the config file be used to set the available languages. // If 0, this will use a built-in list of languages. // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" langselect_use_config "1" Translations If anyone wants to suffer and attempt to translate the gargantuan-sized translation file, please share it here and I might add it into the plugin (if it can be at least mostly verified). It contains 250+ phrases (mostly the names of languages), so it may be hard to verify your work unless you can show sources or proof. Attached Files lang-selector-1.0.0.zip (34.3 KB) lang-selector-1.0.0.7z (27.6 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi