Garry's Mod Wiki

Player:IsListenServerHost

  boolean Player:IsListenServerHost()

Description

Returns if a player is the host of the current session.

Returns

1 boolean
true if the player is the listen server host, false otherwise.

This will always be true in single player, and false on a dedicated server.