GetFPSLimit: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Example added)
m (removed example needed tag)
Line 24: Line 24:
==See Also==
==See Also==
{{Server functions}}
{{Server functions}}
[[Category:Needs_Example]]

Revision as of 12:48, 15 October 2008

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