Here's something to get you going:
This will detect if a user has been idle for 5 seconds, if so, they will be invisible.
Note: There is no team detection or crouch method.
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <fakemeta>
#define PLUGIN "Blah"
#define VERSION "1.0"
#define AUTHOR "delayedCoder"
new Float:lastMove[33];
public plugin_init()
{
register_forward(FM_PlayerPreThink, "fw_playerprethink", 1);
}
public fw_playerprethink(id)
{
static Float:velocity[3];
pev(id,pev_velocity,velocity);
new Float:time = get_gametime();
if(velocity[1] || velocity[0] || velocity[2] || !(pev(id,pev_frags) & FL_ONGROUND))
lastMove[id] = time;
if(time-lastMove[id] >= 5.0)
{
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 20);
lastMove[id] = time;
}
return FMRES_IGNORED;
}