GetScreenSize: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetScreenSize()}} {{FuncParameters}} {{FuncNoParam}} {{FuncReturnValue|__EDIT_ME__}} == Example..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Client|1.0}} | {{Info|Function|Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Get the client's screen size}} | ||
{{FuncSyntax|GetScreenSize()}} | {{FuncSyntax|GetScreenSize()}} | ||
Line 8: | Line 8: | ||
{{FuncNoParam}} | {{FuncNoParam}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Get the client's screen size}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
AddEvent("OnRenderHUD", function() | |||
local ScreenX, ScreenY = GetScreenSize() | |||
AddPlayerChat("Your screen size: "..ScreenX..", "..ScreenY) | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
__EDIT_ME__ | __EDIT_ME__ |
Revision as of 14:39, 14 November 2019
Description
Get the client's screen size
Syntax
GetScreenSize()
Parameters
- This function has no parameters.
Return Value
- Get the client's screen size
Example
AddEvent("OnRenderHUD", function()
local ScreenX, ScreenY = GetScreenSize()
AddPlayerChat("Your screen size: "..ScreenX..", "..ScreenY)
end)
See also
__EDIT_ME__