GetFPSLimit: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
int getFPSLimit ( | int getFPSLimit () | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 15: | Line 15: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function fpsLim() | function fpsLim() | ||
outputChatBox ( "The FPS limit is: " .. tostring( getFPSLimit ( | outputChatBox ( "The FPS limit is: " .. tostring( getFPSLimit () ) ) --function returns an int so we must convert it to a string | ||
end | end | ||
Revision as of 14:50, 16 December 2014
This function retrieves the maximum FPS (Frames per second) that players on the server can run their game at.
Syntax
int getFPSLimit ()
Returns
Returns an integer between 25 and 100 of the maximum FPS that players can run their game at.
Example
This example displays a message in the chatbox showing the current fps limit.
function fpsLim() outputChatBox ( "The FPS limit is: " .. tostring( getFPSLimit () ) ) --function returns an int so we must convert it to a string end -- Add console command "fpslimit" which calls the function fpsLim addCommandHandler ( "fpslimit", fpsLim )
See Also
- getMaxPlayers
- getServerConfigSetting
- getServerHttpPort
- getServerName
- getServerPassword
- getServerPort
- isGlitchEnabled
- setGlitchEnabled
- setMaxPlayers
- setServerConfigSetting
- setServerPassword
- shutdown