Garry's Mod Wiki

Revision Difference

gameevent/server_removeban#548576

<cat>gameevent</cat>⤶ <title>server_removeban</title>⤶ ⤶ <structure>⤶ <realm>Shared</realm>⤶ <description>⤶ Called when a Player is unbanned using the **removeid** or **removeip** command.⤶ ⤶ <note>⤶ 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. ⤶ </note>⤶ </description>⤶ <fields>⤶ <item type="string" name="networkid">The <page text="SteamID">Player:SteamID</page> of the banned Player.</item>⤶ <item type="string" name="ip">The <page text="IPAddress">Player:IPAddress</page> of the banned Player.</item>⤶ <item type="string" name="by">The Person who unbanned the Player. Can be Console.</item>⤶ </fields>⤶ </structure>⤶ ⤶ # Examples⤶ <example>⤶ <description>This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.</description>⤶ <code>⤶ 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 )⤶ </code>⤶ </example>