Garry's Mod Wiki

Garry's Mod Wiki

  Player:AllowFlashlight( boolean canFlashlight )

Description

Sets if the player can toggle their flashlight. Function exists on both the server and client but has no effect when ran on the client.

This is a Lua method that internally uses GM:PlayerSwitchFlashlight. If current gamemode overwrites that hook and doesn't respect Player:CanUseFlashlight, this function will not have any effect.

Arguments

1 boolean canFlashlight
True allows flashlight toggling

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...