A FiveM resource coded in C# to get a persistent flashlight in game.
The resource disables the current default GTA5 flashlight and uses the Fivem Native: DrawSpotlight to create flashlights for all players who have them enabled on the gun (same hotkey: “E”). Everything is synced with other players and the script remembers if the flashlight was on the particular gun when you get it out again, for example entering and exiting a car.
[PREVIEW]
[CONFIG] Default config with a yellowish flashlight
taserflashlight: true/false (enable or disable the flashlight on the taser, use lowercase)
The other variables are from the Fivem native DrawSpotlight (except pos and dir) and can be set in the config to change the flashlight to your own preference. Variables are set to INT in the code, so use whole numbers in the config, decimals won’t work.
Hey quick thing, is there anyway you could send me the code in here or just implement it in there. But whenever I keep the flashlight on and I step in a vehicle and I turn the wheel the flashlight turns with the wheel and I can see the flashlight all over the place. Maybe make it so whenever you step in the vehicle it turns the flashlight off? If you could do that please reply with a code that I myself could add to the code.
Hey, thats actually in the code. It checks if you are in a car and isn’t gonna render the spotlight, I’ve tested it again and it works fine. So i’m unsure what the issue is on your end at the moment.
@SeclusiveSolid
I’ve never seen the resource take that much cpu. The more people use the flashlight in the same location the more intensive it would be, thats true. How many people did you test this with?