|
SourceMod Moderator
|
06-30-2018
, 08:34
Re: [ANY] SteamWorks
|
#684
|
Quote:
Originally Posted by joao7yt
Quote:
Originally Posted by LowIntelligence
This returns the Client's Steam language, I specifically need the language the Game is set to.
|
Hmmm, interesting, I thought it would return the current game language, since sourcemod needs to know that to be able to print translation phrases in the right language... If it doesn’t, then idk
|
It does return the GAME language.
Steam Language: english
Game language: danish
Code:
Client "DarkDeviL" connected (x.x.x.x:27005).
Server waking up from hibernation
DarkDeviL - GetClientInfo "cl_language": danish
DarkDeviL - GetClientLanguage: danish
Generated using something like this in OnClientConnect:
CODE
Code:
char cl_language[32];
if (GetClientInfo(client, "cl_language", cl_language, sizeof(cl_language))) {
PrintToServer("%N - GetClientInfo \"cl_language\": %s", client, cl_language);
} else {
PrintToServer("%N - failed", client);
}
int gcl_number = GetClientLanguage(client);
char gcl_code[4];
char gcl_language[32];
GetLanguageInfo(gcl_number, gcl_code, sizeof(gcl_code), gcl_language, sizeof(gcl_language));
PrintToServer("%N - GetClientLanguage: %s", client, gcl_language);
__________________
Mostly known as "DarkDeviL".
Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
|
|
|
|