GM:PlayerSwitchFlashlight

From Garry's Mod
Jump to: navigation, search
 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

boolean

Can toggle the flashlight or not
Personal tools
Navigation