I tried. It executes client_PreThink hundred times a second. Thats what I don't want.
Watch this:
Code:
set_task(CHECK_USE_PERIOD, "repeat_check_use", 8138459, "", 0, "b")
It makes repeat_check_use( ) function called every CHECK_USE_PERIOD second. repeat_check_use( ) checks if player's pressing a button. That's what I'm trying to avoid ... because it's useless to check each player repeately whether he is trying to press E on his keyboard, if so, whether he is standing near the button. client_PreThink( ) does the same.
I still believe, there is possibility to invoke an event when player presses USE key, but I have found none in meta game list.
Can you help me?