There doesn't seem to be a solid way to do this. The game engine detects landing on PostThink() so we have to do the same, unless the player incurs damage on the fall.
I suppose you could polish it up a little using a bitsum for alive checks, and unregister the forward where possible:
Code:
#include <amxmodx>#include <fakemeta>const XO_PLAYER =5;
const m_flFallVelocity =251;
public plugin_init(){register_plugin("Detect Landing", "0.0.1", "hornet");
register_forward( FM_PlayerPostThink, "CBasePlayer_PostThink");
}public CBasePlayer_PostThink( id ){if(is_user_alive( id )){staticFloat:flFallVelocity; flFallVelocity = get_pdata_float( id, m_flFallVelocity, XO_PLAYER );
if( flFallVelocity && pev( id, pev_flags )& FL_ONGROUND ){//PLAYER JUST LANDED}}}
Do you know that touch is called one time when player is landing?