Raised This Month: $ Target: $400
 0% 

Is visible model?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grankee
Member
Join Date: Jun 2008
Old 02-15-2009 , 11:53   Is visible model?
Reply With Quote #1

How to check on whether player model(or part of them-foot,arm,head etc.) is visible for other player? by way of glass too.
grankee is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 02-15-2009 , 11:59   Re: Is visible model?
Reply With Quote #2

is_visible(); http://www.amxmodx.org/funcwiki.php?go=func&id=796
__________________
xPaw is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 02-15-2009 , 16:13   Re: Is visible model?
Reply With Quote #3

Or for fakemeta:
Code:
stock bool:fm_is_ent_visible(index, entity, ignoremonsters = 0) {         new Float:start[3], Float:dest[3]     pev(index, pev_origin, start)     pev(index, pev_view_ofs, dest)     xs_vec_add(start, dest, start)         pev(entity, pev_origin, dest)     engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0)         new Float:fraction     get_tr2(0, TR_flFraction, fraction)     if (fraction == 1.0 || get_tr2(0, TR_pHit) == entity)         return true         return false }

But sometime can return false when you actually see a part from an entity.
__________________

anakin_cstrike is offline
grankee
Member
Join Date: Jun 2008
Old 02-15-2009 , 18:24   Re: Is visible model?
Reply With Quote #4

xPaw

Code:
public client_PreThink(id)
{
    if(is_user_connected(1)&&is_user_connected(2)&&is_user_alive(1)&&is_user_alive(2))
    {
        if(is_visible(1,2))
        {
            client_print(1,print_center,"1")
        }
        else
        {
            client_print(1,print_center,"0")
        }
    }
}
show in center 0 all time :/
My id number is 1 and other player number is 2
anakin, this is bad idea:
Quote:
Originally Posted by anakin
But sometime can return false when you actually see a part from an entity.

Last edited by grankee; 02-15-2009 at 18:27.
grankee is offline
grankee
Member
Join Date: Jun 2008
Old 02-15-2009 , 18:25   Re: Is visible model?
Reply With Quote #5

delete me

Last edited by grankee; 02-15-2009 at 18:27. Reason: unnecessary post. sorry
grankee is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 02-15-2009 , 22:43   Re: Is visible model?
Reply With Quote #6

Check this thread: http://forums.alliedmods.net/showthread.php?t=74780
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
grankee
Member
Join Date: Jun 2008
Old 02-15-2009 , 23:07   Re: Is visible model?
Reply With Quote #7

doesn't work?

Last edited by grankee; 02-16-2009 at 14:37.
grankee 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 17:08.


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