This fix gets rid of majority of trolls that join your server and try to simply just open inventories. It takes in consideration of staff and it happening realistically. You can do all of it properly if you literally go up to the person and rob them.
It does the following :
[x] It checks if the distance between the player requesting the inventory is greater than 4.5 meters.
[x] If the distance is greater than 4.5 meters is it a staff member.
[x] if the distance is greater than 4.5 meters and player is not staff ban that troll!
[x] if the distance is lower than 4.5 and the suspect is not noclipping or invisible then let him do it!
[x] if its he is either invisible or noclipping clap his ass!
Checklist
[ ] I have personally loaded this code into an updated qbcore project and checked all of its functionality.
Description
This fix gets rid of majority of trolls that join your server and try to simply just open inventories. It takes in consideration of staff and it happening realistically. You can do all of it properly if you literally go up to the person and rob them.
It does the following :
Checklist