Raised This Month: $51 Target: $400
 12% 

Multi language in plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CsIosefin
Senior Member
Join Date: Aug 2009
Old 09-25-2012 , 09:46   Multi language in plugin
Reply With Quote #1

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
		}
	}
CsIosefin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-25-2012 , 20:10   Re: Multi language in plugin
Reply With Quote #2

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.
__________________
fysiks is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 09-26-2012 , 18:10   Re: Multi language in plugin
Reply With Quote #3

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)
jimaway is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:02.


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