ReloadBans: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server function}} This function will reload the server ban list file. ==Syntax== <syntaxhighlight lang="lua"> bool reloadBans () </syntaxhighlight> ===Returns=== Returns ''true'' if the ba...")
 
Line 12: Line 12:


==Example==
==Example==
This example add "reloadban" to reload the server ban list file.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--TODO
function ReBan (player)
  if (reloadBans()) then
      outputChatBox("Bans has been reloaded successfully.",player)
  else
      outputChatBox("Failed to Reload Bans.",player)
  end
end
addCommandHandler("reloadban",ReBan)
</syntaxhighlight>
</syntaxhighlight>



Revision as of 17:23, 24 April 2012

This function will reload the server ban list file.

Syntax

bool reloadBans ()

Returns

Returns true if the ban list was reloaded successfully, false otherwise.

Example

This example add "reloadban" to reload the server ban list file.

function ReBan (player)
   if (reloadBans()) then
      outputChatBox("Bans has been reloaded successfully.",player)
   else
      outputChatBox("Failed to Reload Bans.",player)
   end
end
addCommandHandler("reloadban",ReBan)

Requirements

This template will be deleted.

See Also