Hi all, how convert this code (from fakemeta_util.inc) :
PHP Code:
stock Float:fm_distance_to_floor(index, ignoremonsters = 1) {
new Float:start[3], Float:dest[3], Float:end[3]
pev(index, pev_origin, start)
dest[0] = start[0]
dest[1] = start[1]
dest[2] = -8191.0
engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0)
get_tr2(0, TR_vecEndPos, end)
pev(index, pev_absmin, start)
new Float:ret = start[2] - end[2]
return ret > 0 ? ret : 0.0
}
to new function:
PHP Code:
stock Float:fm_distance_to_ceiling(index, ignoremonsters = 1) {
......
}
Thx ...
__________________