Raised This Month: $ Target: $400
 0% 

How can i convert this code to engine ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-28-2012 , 16:51   Re: How can i convert this code to engine ?
Reply With Quote #2

instead of :

if( is_hull_vacant( origin, hullIndex, playerIndex ) )

Put in your code :

if( ! trace_hull(origin, hullIndex, playerIndex, 0) )


http://www.amxmodx.org/funcwiki.php?go=func&id=364

tracehull return is :

+1 if fStartSolid
+2 if fAllSolid
+4 if !fInOpen (that one was missing in your stock)

So if it returns 0, the place if free ;)


If you still don't want to check fInOpen, just do if( ~trace_hull(...) & 3 )
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-28-2012 at 16:54.
ConnorMcLeod 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:45.


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