player.Ban
From GMod Wiki
| 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: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.Ban]Player.Ban [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | This example bans all players on the server for 10 minutes |
|---|---|
| Used on | |
| Code | for x, v in pairs(player.GetAll()) do v:Ban(10, "I don't need to give you a reason!") end |
| Output | N/A |
| Description | This example will ban all players for ever and ever. |
|---|---|
| Used on | |
| Code | for x, v in pairs(player.GetAll()) do v:Ban(0, "Go, Away.") end |
| Output | N/A |