Player.FlashlightIsOn

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player:FlashlightIsOn( )
Description:
Returns true if the player's flashlight is on.
Returns: Boolean
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.FlashlightIsOn]Player.FlashlightIsOn [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionPrint a message to players if their flashlight is on.
Used onNewerServer.png
Code
for _, ply in pairs( player.GetAll() ) do
	if ( ply:FlashlightIsOn() ) then ply:ChatPrint( "Your flashlight is on!" ) end
end
 
OutputNone


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox