Prevent players to use the F8 console to see your server files.
Right now in FiveM players can use the F8 console and then use the
build in NUI DevTools to see your server files. This is a huge
security risk! Players will be able to see your client files and
therefor its code. Players will be able to inject their own script
or being able to change the code client side. This can be used to
spawn in items, deplicate items, get your self payed but worse of
all delete other players characters. This script prevents users
from using the F8 completely.
What does this script do?
This script detects when a player uses the F8 button. The moment
they hit the F8 button, the player will be kicked from the server.
Whitelist:
If you want players/admins to be able to use the F8 console,
you can whitelist them with their FiveM lisence ID within the
config file.
Other reasons why this is usefull?
For roleplay servers this can be usefull in general. Players are
able to make changes, for examle: Changing their games Gamma.
This enables them to see more then others the moment its dark.
This could be the difference between a win or lose during a gun fight.
ESX or other Frameworks?
This script can be used with any framework!