Garry's Mod

Garry's Mod

974 ratings
IFL - CLIENTSIDE Improved Flashlight
3
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Realism
File Size
Posted
Updated
22.575 KB
4 Feb @ 9:18pm
21 Feb @ 1:32am
5 Change Notes ( view )

Subscribe to download
IFL - CLIENTSIDE Improved Flashlight

Description
A fully clientside improved flashlight system.

Built around singleplayer.

Allows you to fully customize the flashlight, attach it to your weapon (first and third person!) and enable aesthetics like flickering and chances for the flashlight to turn off when taking damage.

Pretty optimized and its made work with many different weapons and situations. Also has a cool sway effect when not attached to weapon in first person.

Also respects mp_flashlight ConVar!





----------------------------------------------------------------

ConVars:

IFL_flashlight 1/0 - Enable/Disable IFL flashlight.
IFL_flashlight_flicker 1/0 - Enable/Disable flashlight flickering effects.
IFL_flashlight_weapon 1/0 Use weapon (worldmodel and viewmodel) muzzle attachment for flashlight, if available.
IFL_flashlight_color (R G B) Set flashlight color, seperated by spaces.
IFL_flashlight_brightness (VALUE) - Set flashlight brightness.
IFL_flashlight_fov (VALUE) - Set flashlight fov.
IFL_flashlight_texture (NAME) - Sets flashlight texture.
IFL_flashlight_farz (VALUE) - Set flashlight farz (distance).
IFL_flashlight_nearz (VALUE) - Set flashlight nearz (cutoff). This is helpful for self shadowing on PM’s or weapons.
IFL_flashlight_swayfactor (VALUE) - Set flashlight sway factor (how fast it sways).
IFL_flashlight_ondamage 1/0 - Sets if flashlight should have a chance to turn off on damage.
IFL_flashlight_sprite 1/0 - Sets if flashlight (if IFL_flashlight_weapon 1) should draw a sprite.
IFL_flashlight_pushback 1/0 - Sets if flashlight should be pushed backwards near a wall.

IFL_flashlight_flicker_freq (VALUE) - Sets how rare flickering is.
IFL_flashlight_flicker_int (VALUE) - Sets how intense flickering is.

IFL_flashlight_Blacklist_Add (Path/MODELNAME.mdl) - Adds model to blacklist.
IFL_flashlight_Blacklist_Remove (Path/MODELNAME.mdl) - Removes model from blacklist.

IFL_GetWorldModel - Gets players worldmodel name (thirdperson).
IFL_GetViewModel - Gets players viewmodel name (firstperson).

----------------------------------------------------------------

This was my favorite addon to make so far- enjoy!

If a weapon has incorrect attachment angles or shouldn’t attach (some crowbar replacements do this) then you can blacklist them using the commands above!

Possible future updates planned:

-Multiplayer support
166 Comments
Mr.Patate 20 Oct @ 8:21am 
idk why but your light mods don't work well with the volumetric mods, everytime i use them together it just does a huge fps drop of like 1 fps
SomeJoeSoldier 17 Oct @ 7:27am 
i found the issue sorry for commenting again but i know the problem it happens when you basically open the menu (Q) it breaks BUT after running its back hope this help!
SomeJoeSoldier 17 Oct @ 7:18am 
Hey dev! so i got it fixed so its not working with some weapons like ARC9 but i fixed it! by restarting gm and going to a other map this usually happens when first starting gm_construct i will appericate it if you fix this! also this wasnt working cuz i was using a bodycam lol
SomeJoeSoldier 17 Oct @ 3:29am 
the flashlight keeps going up help
froelz 30 Sep @ 11:46am 
+1 would be nice, Fading Wounds Fix doesn't work with this unfortunately.

Also found that looking at grass/trees with the flashlight on some maps tanks your FPS, great addon otherwise.
Gabriel ML 30 Sep @ 2:37am 
Is it possible to fix the fading wounds thingy? When you shine your flashlight on an NPC with blood decals, they dissapear
Snicktlogan 27 Sep @ 12:38pm 
is it possible to connect the original flashlight config to this and make it so that if you have the mod you can't see the original flashlight (I know nothing about making mods)
kizbo228 13 Sep @ 7:40am 
multiplayer pls:missing:
Gorigo 11 Sep @ 10:33am 
agree with comment below