Loop all "func_button" entities in a X radius around the player using the "find_sphere_class" function.
You can find the X by doing a simple test - adding a chat message when you press a button that prints out the distance between the player and the button entity.
Or I guess you can look in the game's code to find the 100% accurate distance.
//Edit: I believe the radius is 64 according to
this:
Code:
//
// PlayerUse - handles USE keypress
//
#define PLAYER_SEARCH_RADIUS (float)64
__________________