# sam.Player.ban

> #### sam.Player.ban( [player](https://wiki.facepunch.com/gmod/player) pl&#x79;**,** *(*[*optional*](https://sam.goobie.me/info-read/optional)*)* [number](https://wiki.facepunch.com/gmod/number) **length** *=* *0*, *(*[*optional*](https://sam.goobie.me/info-read/optional)*)* [string](https://wiki.facepunch.com/gmod/string) reason *=* *"none", (*[*optional*](https://sam.goobie.me/info-read/optional)*)* [string](https://wiki.facepunch.com/gmod/string) admin\_steamid64 )

## Description

Ban a player.

## Aguments

1. #### [player](https://wiki.facepunch.com/gmod/player) ply
2. #### *(*[*optional*](https://sam.goobie.me/info-read/optional)*)* [number](https://wiki.facepunch.com/gmod/number) **length** *=* *0*

   length is in minutes, 0 = indefinitely
3. #### *(*[*optional*](https://sam.goobie.me/info-read/optional)*)* [string](https://wiki.facepunch.com/gmod/string) reason *=* *"none"*

   default reason is in languages folder.
4. #### *(*[*optional*](https://sam.goobie.me/info-read/optional)*)* [string](https://wiki.facepunch.com/gmod/string) admin\_steamid64

   default will be [Console](https://sam.goobie.me/info-read/console)'s SteamID64.
