GM/PlayerSwitchFlashlight
From Garry's Mod
GM:PlayerSwitchFlashlight( )
Contents |
Description
Called whenever a player attempts to either turn on or off their flashlight, returning false will deny the change.
NOTE |
Also gets called when using Player:Flashlight. |
Arguments
Player ply
The player who attempts to change their flashlight state.
Arguments
boolean enabled
The new state the player requested, true for on, false for off.
Returns
Can toggle the flashlight or not