AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is visible model? (https://forums.alliedmods.net/showthread.php?t=85750)

grankee 02-15-2009 11:53

Is visible model?
 
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.

xPaw 02-15-2009 11:59

Re: Is visible model?
 
is_visible(); http://www.amxmodx.org/funcwiki.php?go=func&id=796

anakin_cstrike 02-15-2009 16:13

Re: Is visible model?
 
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.

grankee 02-15-2009 18:24

Re: Is visible model?
 
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.


grankee 02-15-2009 18:25

Re: Is visible model?
 
delete me

Emp` 02-15-2009 22:43

Re: Is visible model?
 
Check this thread: http://forums.alliedmods.net/showthread.php?t=74780

grankee 02-15-2009 23:07

Re: Is visible model?
 
doesn't work?


All times are GMT -4. The time now is 17:08.

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