View Single Post
psychonic

BAFFLED
Join Date: May 2008
Old 01-09-2011 , 13:51   Re: Dynamic MOTD
Reply With Quote #17

Quote:
Originally Posted by Leonardo View Post
hmm, I've tried to do it myself
in DoReplacements
PHP Code:
    decl String:clientFlag[3];
    
decl String:clientLang[46];
    
GetLanguageInfo(GetClientLanguage(client), clientFlagsizeof(clientFlag), clientLangsizeof(clientLang));
    
ReplaceString(motdtitlesizeof(motdtitle), "{USER_FLAG}"clientFlag);
    
ReplaceString(motdurl,   sizeof(motdurl),   "{USER_FLAG}"clientFlag);
    
ReplaceString(motdtitlesizeof(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.
psychonic is offline