player.Ban

From GMod Wiki

Revision as of 04:30, 13 September 2011 by immibis (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax player.Ban( Integer minutes, String reason )
Where is this used?
Description:
Bans a player from the server (use 0 minutes to permanently ban someone)
Returns: nil
Part of Library: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.Ban]Player.Ban [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis example bans all players on the server for 10 minutes
Used onNewerServer.png
Code
for x, v in pairs(player.GetAll()) do
	v:Ban(10, "I don't need to give you a reason!")
end
OutputN/A

DescriptionThis example will ban all players for ever and ever.
Used onNewerServer.png
Code
for x, v in pairs(player.GetAll()) do
	v:Ban(0, "Go, Away.")
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox