Shutdown: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: {{Server client function}} __NOTOC__ This function shuts down the server. Make sure your server ACL setup has function.shutdown object protected. ==Syntax== <syntaxhighlight lang="lua"> bool shutdown (...)
 
No edit summary
Line 1: Line 1:
{{Server client function}}
{{Server client function}}
__NOTOC__
__NOTOC__
This function shuts down the server. Make sure your server ACL setup has function.shutdown object protected.
This function shuts down the server.  
 
Make sure your server ACL setup has function.shutdown object protected.


==Syntax==  
==Syntax==  

Revision as of 14:20, 26 March 2008

This function shuts down the server.

Make sure your server ACL setup has function.shutdown object protected.

Syntax

bool shutdown ( string reason )         

Required Arguments

  • reason: the reason why the server has been shut down.

Returns

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

Example

This command shuts down the server on request

addCommandHandler ( "shutdown", function ( player, command, reason ) )
  if ( hasObjectPermissionTo ( player, "function.shutdown" ) ) then
    shutdown ( reason or "" )
  end
end )

See Also