For example:
Code:
#include <amxmodx>
#include <fakemeta>
#define MAX_PLAYERS 32
new bool:g_in_the_air[MAX_PLAYERS + 1]
public plugin_init() {
register_forward(FM_PlayerPostThink, "forward_player_postthink")
}
public forward_player_postthink(id) {
if (!is_user_alive(id))
return FMRES_IGNORED
if (!(pev(id, pev_flags) & FL_ONGROUND))
g_in_the_air[id] = true
else if (g_in_the_air[id]) {
set_pev(id, pev_watertype, CONTENTS_WATER)
g_in_the_air[id] = false
}
return FMRES_IGNORED
}