AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Multi language in plugin (https://forums.alliedmods.net/showthread.php?t=196757)

CsIosefin 09-25-2012 09:46

Multi language in plugin
 
Hello! I want sma contain two or more languages ​​through a set menu (this is not done multilingual.sma amxmodx plugin).
The difficulty we face is that they do not know how to set a cvar person (1 or 2 menu language).
Menu language:
Code:

public LANGUAGE(id, menu, item)
{
        storage[id] = item
        switch(item)
        {
                case 0:
                {
                        client_cmd(id, "cvar_language 0")
                }
                case 1:
                {
                        client_cmd(id, "cvar_language 1")
                }
        }
        return PLUGIN_CONTINUE
}

Function:
Code:

        switch(get_cvar_num("cvar_language"))
        {
                case 0:
                {
                        client_print(0, print_chat, "[LANG1] %s: %s", name, message)
                        return PLUGIN_HANDLED
                }
                case 1:
                {
                        client_print(0, print_chat, "[LANG2] %s: %s", name, message)
                        return PLUGIN_HANDLED
                }
        }


fysiks 09-25-2012 20:10

Re: Multi language in plugin
 
There is no cvar on the client for this. The built in multilingual system is highly recommended. Also, anything other than that will likely be to agonizing to make so just assume that it will never happen. This is my opinion.

jimaway 09-26-2012 18:10

Re: Multi language in plugin
 
i'd also reccomend built in system, but if you really want your own "multilingual system" for some reason then you could use set info command on client to set their language and get_user_info to check what language to print (dont think thats considered slowhacking since amxx uses that method for multilingual system)


All times are GMT -4. The time now is 08:12.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.