No need for the whole point_viewthingie shabang.
But here's the snippet out of all of that that would show you how to find if he has a ceiling
PHP Code:
stock Float:findCeiling(target, Float:vecOrigin[3]) {
decl Float:vecPos[3];
new Handle:trace = TR_TraceRayFilterEx(vecOrigin, g_vecDown, CONTENTS_SOLID|CONTENTS_MOVEABLE, RayType_Infinite, TraceEntityFilterPlayer, target);
if(TR_DidHit(trace)) {
TR_GetEndPosition(vecPos, trace);
//if(vecOrigin[2]-vecPos[2]>64) { // are they 60 units off the ground?
// PrintToChat(attacker, "\x04Airshot! \x01You hit \x04%N \x01in the air!", target);
// EmitSoundToClient(attacker, TF2DM_AIRSOUND, _, _, _, _, 1.0);
//}
}
CloseHandle(trace);
return vecPos[2];
}
This would find the position of the ceiling directly above him. Simply do a distance check and you'll know if he's close enough.
__________________