ReloadBans: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Remove obsolete Requirements section)
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool reloadBans ()
bool reloadBans()
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[Ban]].reload}}


===Returns===
===Returns===
Line 23: Line 25:
addCommandHandler("reloadban",ReBan)
addCommandHandler("reloadban",ReBan)
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|1.3.0-9.03931|n/a|}}


==See Also==
==See Also==
{{Admin functions}}
{{Admin functions}}
[[Category:Needs Example]]

Latest revision as of 17:01, 7 November 2024

This function will reload the server ban list file.

Syntax

bool reloadBans()


OOP Syntax Help! I don't understand this!

Method: Ban.reload(...)


Returns

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

Example

This example add command "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)

See Also