Player.IsConnected

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:IsConnected( )
Description:
Returns true if the player is currently connected. false if otherwise.
Returns: Boolean
In Object: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.IsConnected]Player.IsConnected [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionPrints true if player 1 is connected, if not, it prints false
Used onNewerServer.png
Code
pl=player.GetByID(1)
print(tostring(pl:IsConnected()))
OutputBoolean
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox