Garry's Mod Wiki

server_removeban

Description

Called when a Player is unbanned using the removeid or removeip command.

If the player was banned using banip was used the networkid will be an empty string.
If the player was banned using banid was used the ip will be an empty string.

Parameters

string networkid
The SteamID of the banned Player.
string ip
The IPAddress of the banned Player.
string by
The Person who unbanned the Player. Can be Console.

Examples

Example

This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "server_removeban" ) hook.Add( "server_removeban", "server_removeban_example", function( data ) local entindex = data.entindex // The Entity:EntIndex() of the broken Prop. local userid = data.userid // The UserID of the connected Player. Seems to be 0 every time. local material = data.material // The Material index of the broken entity. // Called when a func_break is broken by a player. end )