Raised This Month: $ Target: $400
 0% 

Make a player invisible to one player


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 08-04-2008 , 11:58   Re: Make a player invisible to one player
Reply With Quote #24

It's just like hooking a TraceLine. This is how a TraceLine usually works in Half-Life.

Code:
// PRE HOOK UTIL_TraceLine(vecSrc, vecEnd, dont_ignore_monsters, ENT(pev), &tr); // POST HOOK if (tr.flFraction != 1.0) ...

If you hook it as a pre hook, then any changes you make to the trace are just going to get overwritten as soon as it finishes the trace. It might actually change the results of the last trace sent before this one.

But if you hook it as a post hook, then you can change the results of the completed trace before the game gets a chance to look at them. So in this example, you could change flFraction in a post hook and it would effect the if statement.

AddToFullPack works the same way, ish.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode