G.GetHostName

From GMod Wiki

Jump to: navigation, search
Function
Syntax GetHostName( )
Where is this used?
Description:
Gets the current server hostname
Returns: String
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.GetHostName]G.GetHostName [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionTells us what server we are playing on.
Used onNewerShared.png
Code
print("Looks like we're playing on "..GetHostName())
OutputLooks like we're playing on <Enter servers hostname here>
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox