SetFPSLimit

From Multi Theft Auto: Wiki
Revision as of 20:39, 21 May 2008 by Talidan (talk | contribs) (New page: {{Server function}} __NOTOC__ This function sets the maximum [http://en.wikipedia.org/wiki/Frame_rate FPS (Frames per second)] that players on the server can run their game at. ==Syntax...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function sets the maximum FPS (Frames per second) that players on the server can run their game at.

Syntax

bool setFPSLimit ( int fpsLimit )         

Required Arguments

  • fpsLimit: An integer value representing the maxmimum FPS. This value may be between 25 and 100 FPS.

Returns

Returns false if it was not possible to shut down the server.

Example

This command sets the fps limit in a command handler.

addCommandHandler ( "setfps", function ( player, command, limit )
  if ( hasObjectPermissionTo ( player, "function.setFPSLimit" ) ) then
    setFPSLimit ( limit )
  end
end )

See Also