The inspiration for this, as I create a concept this time comes from Adio's LS-RP videos where he tosses tear gas grenades into rooms which are roleplayed as flashbang grenades. I was limited by the fact that grenades aren't entirely synced and therefore you cannot get the Vector information about the location where they were thrown and landed. I came up with just using shotgun cartridges like the Beanbag rounds that are for non-lethal circumstances. I had created a similar concept a long time ago but never shared it or completed it.
That being said, this is only a proof of concept and I only spent about half an hour writing this.
What does it do? Well you can load your shotgun with "Flashbang" cartridges using /toggleflashshells or /tfs for short, and you shoot at, or near where you want a flashbang to occur. All the players within 15 units of where the shot lands will be blinded with a TextDraw and will get a nice little explosion sound played for them. This forces a player to roleplay the flash, where often or not they will claim they "looked away".
- Make a 3dTextLabel appear where the shot landed, and display how long ago it landed there (Using GetTickCount() but not sure whether or not to remove this feature completely, could be overkill or useless.
- "Flashed!" to come up above the effected players heads, will disappear when they are no longer flashed. A good indicator for law enforcement to know if someone is suffering the effects
- Add the "Drunk" effect, getting flashbanged will be disorientating for a player and they shouldn't feel fine afterwards.
- Allow the shooter to only load a certain amount of shells. This allows them to go straight back to firing lethal 12 Gauge after they've used up their flashbang shells (ex: /toggleflashshells 3 will load 3 flashbang cartridges then revert back to normal buckshot)
- Add auto RP line for when you load a shell (ex: Ari has loaded three flashbang cartridges into their shotgun.)
- Convert where appropriate to Incognito's "CreateDynamic_"
- Add a RP line similar to when a player is tazed (ex: "John was blinded by Ari's flashbang!")
- Incognito's Streamer
The source code is viewable on my GitHub found here
Feel free to expand or completely re-write this code, it was only proof of concept and I was only doing it for some fun!