Garry's Mod Wiki

Garry's Mod Wiki

  number surface.ScreenWidth()

Description

We advise against using this. It may be changed or removed in a future update. You should use ScrW instead.

Returns the width of the current client's screen.

Returns

1 number
screenWidth

Example

Prints out the current width of the screen.

MsgN("Screen width: " .. surface.ScreenWidth())
Output: Screen width: 1920

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...