This should work:
Code:
new bool:g_bOnGround[1024]
// ...
public plugin_init()
{
register_think("newEnt","fnEntityThink")
// ...
}
public fnEntityThink(iEnt)
{
new iFlags = entity_get_int(iEnt,EV_INT_flags)
if(iFlags & FL_ONGROUND && !g_bOnGround[iEnt])
// entity hit the ground, do what you want
g_bOnGround[iEnt] = (iFlags & FL_ONGROUND) ? true : false
}
__________________