GetServerName: Difference between revisions

From Onset Developer Wiki
(Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetServerName()}} {{FuncParameters}} {{FuncNoParam}} {{FuncReturnValue|__EDIT_ME__}} == Example...")
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Gets the servers display name.}}


{{FuncSyntax|GetServerName()}}
{{FuncSyntax|GetServerName()}}
Line 8: Line 8:
{{FuncNoParam}}
{{FuncNoParam}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|The name of the server}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
AddPlayerChat(playerid, "Welcome to "..GetServerName()..".")
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[SetServerName]]

Latest revision as of 10:03, 12 December 2019

GetServerName

Type: Function
Context: Server
Introduced: v1.0

Description

Gets the servers display name.

Syntax

GetServerName()

Parameters

  • This function has no parameters.

Return Value

  • The name of the server

Example

AddPlayerChat(playerid, "Welcome to "..GetServerName()..".")

See also