|
BAFFLED
|
01-09-2011
, 13:51
Re: Dynamic MOTD
|
#17
|
Quote:
Originally Posted by Leonardo
hmm, I've tried to do it myself
in DoReplacements
PHP Code:
decl String:clientFlag[3];
decl String:clientLang[46];
GetLanguageInfo(GetClientLanguage(client), clientFlag, sizeof(clientFlag), clientLang, sizeof(clientLang));
ReplaceString(motdtitle, sizeof(motdtitle), "{USER_FLAG}", clientFlag);
ReplaceString(motdurl, sizeof(motdurl), "{USER_FLAG}", clientFlag);
ReplaceString(motdtitle, sizeof(motdtitle), "{USER_LANG}", clientLang);
ReplaceString(motdurl, sizeof(motdurl), "{USER_LANG}", clientLang);
and it works fine ...
but I trust you're right
|
http://docs.sourcemod.net/api/index....d=show&id=152&
Quote:
Retrieves the language number of a client. Currently this simply returns the server language index.
|
To get the language, you need to query the cl_language cvar on the client.
Last edited by psychonic; 01-09-2011 at 13:53.
|
|
|
|