Garry's Mod Wiki

GM:PlayerSwitchFlashlight

Description

Called whenever a player attempts to either turn on or off their flashlight, returning false will deny the change.

Arguments

1 Player ply
The player who attempts to change their flashlight state.
2 boolean enabled
The new state the player requested, true for on, false for off.

Returns

1 boolean
Can toggle the flashlight or not
Also gets called when using Player:Flashlight.

Page Links


Special Pages


Wikis

?

Render Time: 32ms

DB GetPage 3
Generate Html 8
SaveChanges (1) 11
Render Body 0
Render Sidebar 7