Raised This Month: $ Target: $400
 0% 

Distance to Ceiling


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
butthead
Member
Join Date: May 2007
Location: Nitra, Slovakia
Old 01-12-2009 , 15:29   Distance to Ceiling
Reply With Quote #1

Hi all, how convert this code (from fakemeta_util.inc) :

PHP Code:
stock Float:fm_distance_to_floor(indexignoremonsters 1) {
    new 
Float:start[3], Float:dest[3], Float:end[3]
    
pev(indexpev_originstart)
    
dest[0] = start[0]
    
dest[1] = start[1]
    
dest[2] = -8191.0

    engfunc
(EngFunc_TraceLinestartdestignoremonstersindex0)
    
get_tr2(0TR_vecEndPosend)

    
pev(indexpev_absminstart)
    new 
Float:ret start[2] - end[2]

    return 
ret ret 0.0

to new function:

PHP Code:
stock Float:fm_distance_to_ceiling(indexignoremonsters 1) {

......  


Thx ...
__________________
butthead is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-12-2009 , 15:35   Re: Distance to Ceiling
Reply With Quote #2

PHP Code:
stock Float:fm_distance_to_ceiling(indexignoremonsters 1) {
    new 
Float:start[3], Float:dest[3], Float:end[3]
    
pev(indexpev_originstart)
    
dest[0] = start[0]
    
dest[1] = start[1]
    
dest[2] = 8191.0

    engfunc
(EngFunc_TraceLinestartdestignoremonstersindex0)
    
get_tr2(0TR_vecEndPosend)

    
pev(indexpev_absmaxstart)
    new 
Float:ret end[2] - start[2]

    return 
ret ret 0.0

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
butthead
Member
Join Date: May 2007
Location: Nitra, Slovakia
Old 01-12-2009 , 15:47   Re: Distance to Ceiling
Reply With Quote #3

Thx, + karma
__________________
butthead is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 01-12-2009 , 15:56   Re: Distance to Ceiling
Reply With Quote #4

Oh this is great man
__________________
Dr.G is offline
Reply



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 01:40.


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