Player.FlashlightIsOn

From GMod Wiki

Revision as of 02:49, 18 September 2009 by Unrealomega (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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