GetPlayerLocale: Difference between revisions

From Onset Developer Wiki
28days (talk | contribs)
No edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|Get the player localiaztion name.}}
{{FuncDescription|Returns the computers localization of a player. For example en_US, de_DE, etc.}}


{{FuncSyntax|GetPlayerLocale(player)}}
{{FuncSyntax|GetPlayerLocale(player)}}
Line 8: Line 8:
{{FuncParam|player|The player identifier.}}
{{FuncParam|player|The player identifier.}}


{{FuncReturnValue|Returns a string with the player's localozation name.}}
{{FuncReturnValue|Returns a string with the player's localization.}}


== Example ==
== Example ==
Line 18: Line 18:


{{RelatedFunctions}}
{{RelatedFunctions}}
{{Template:PlayerFunctions}}
{{ServerPlayerFunctions}}

Latest revision as of 20:41, 27 May 2021

GetPlayerLocale

Type: Function
Context: Server
Introduced: v1.0

Description

Returns the computers localization of a player. For example en_US, de_DE, etc.

Syntax

GetPlayerLocale(player)

Parameters

  • player
    The player identifier.

Return Value

  • Returns a string with the player's localization.

Example

AddEvent("OnPlayerJoin", function(playerid)
	AddPlayerChatToAll("[JOIN] "..GetPlayerName(playerd).." has joined from "..GetPlayerLocale(player))
end)

See also