Player.Flashlight

From GMod Wiki

Revision as of 02:38, 18 September 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Player:Flashlight( Boolean on )
Description:
Turn the players flash light on / off
Returns: nil
In Object: Player
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.Flashlight]Player.Flashlight [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionCreates a console command to toggle the player's flashlight.
Used onNewerServer.png
Code
concommand.Add("flashlight", function(ply) // Creating the concommand flashlight and linking it to a function
	ply:Flashlight( !ply:FlashlightIsOn() ) // Toggle the player's flashlight
end)
OutputNone


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox