PHP Code:
public pfn_touch(entity, id)
{
if(pev_valid(entity)
&& !task_exists(entity+16541))
{
if(pev(entity, pev_classname) == g_eClassnameid)
{
static intOwner
intOwner = pev(entity, pev(entity, pev_euser2) ? pev_euser1 : pev_owner)
client_print(0, print_chat, "Owner %i: id: %i", intOwner, id)
if(!pev_valid(id))
{
// Entity System
static Float:vecOrigin[3], Float:vecOutput[3]
pev(entity, pev_origin, vecOrigin)
xs_vec_copy(vecOrigin, vecOutput)
vecOutput[2] -= 30.0
new iTraceHandle = create_tr2()
engfunc(EngFunc_TraceLine, vecOrigin, vecOutput, IGNORE_MONSTERS, id, iTraceHandle)
get_tr2(iTraceHandle, TR_vecEndPos, vecOutput)
free_tr2(iTraceHandle)
new intDiff = (floatround(vecOrigin[2]) - floatround(vecOutput[2]))
}
}
}
return PLUGIN_CONTINUE
}
Play with this, it checks walls & ground, so check height or something, to find out
__________________