Quote:
Originally Posted by edon1337
Depends the situation, example in Ice Cube plugin, you must reset it on disconnect either if player is frozen and disconnects the ice cube will remain. It's not necessary to reset on both forwards, reset it just on client_disconnect or just client_connect , just put some logic into it.
|
You want logic? Ok.
For example I check users for inconsistent files (such as client side .dll files which can be fake cvar spoofer or different cheats) and if it doesn't find such file (incosistent file) it sets boolean allowed to true, else it sets boolean to false.
After that i check in putinserver boolean and if it's false then i kick player.
The problem is that I can't set allowed to false on connect because plugin_precache is triggered before client_connect. And imagine that case when client_disconnect is not triggered. It means that even if player has that file then boolean still remains true from previous disconnected player.