Garry's Mod Wiki

surface.ScreenWidth

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

Page Links


Special Pages


Wikis

?

Render Time: 43ms

DB GetPage 20
Generate Html 1
SaveChanges (1) 8
Render Body 0
Render Sidebar 11