Raised This Month: $ Target: $400
 0% 

How to detect if player is under roof, brigde etc...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wuu
Member
Join Date: Apr 2008
Old 06-12-2010 , 13:00   How to detect if player is under roof, brigde etc...
Reply With Quote #1

How to detect if player is under roof, bridge etc.. I want to make mode that require player to cover. If player is under clear sky, i need to rune some function on him. It's really is big deal for my plugin, pleas help!
Wuu is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 06-12-2010 , 13:08   Re: How to detect if player is under roof, brigde etc...
Reply With Quote #2

Traceline, perhaps?
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-12-2010 , 13:17   Re: How to detect if player is under roof, brigde etc...
Reply With Quote #3

PointContents

PHP Code:
public bool:ClearSkyid )
{
    new 
Float:fOrigin];
    
    
pevid pev_origin fOrigin );
    
    while ( 
engfuncEngFunc_PointContents fOrigin ) == CONTENTS_EMPTY )
        
fOrigin[2] += 10.0;
    
    return ( !!
engfuncEngFunc_PointContents fOrigin ) == CONTENTS_SKY );

__________________

Last edited by Bugsy; 06-12-2010 at 13:38.
Bugsy is offline
Wuu
Member
Join Date: Apr 2008
Old 06-19-2010 , 07:16   Re: How to detect if player is under roof, brigde etc...
Reply With Quote #4

Bugsy, how to use this function? For me it not returning anything.
Wuu is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-19-2010 , 15:26   Re: How to detect if player is under roof, brigde etc...
Reply With Quote #5

Quote:
Originally Posted by Wuu View Post
Bugsy, how to use this function? For me it not returning anything.
PHP Code:
if ( ClearSkyid ) )
{
     
//clear sky above players head

__________________
Bugsy is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 06-19-2010 , 12:15   Re: How to detect if player is under roof, brigde etc...
Reply With Quote #6

Traceline over your head first
hzqst is offline
Wuu
Member
Join Date: Apr 2008
Old 06-19-2010 , 14:12   Re: How to detect if player is under roof, brigde etc...
Reply With Quote #7

Quote:
Originally Posted by hzqst View Post
Traceline over your head first
Sory, i am new at this. I don't understand.
Wuu 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 14:53.


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