AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   visiblity only with nightvision (https://forums.alliedmods.net/showthread.php?t=130514)

mati009988 06-24-2010 13:44

visiblity only with nightvision
 
Hello,
When i use set_entity_visibility(id, 0) in code player is invisible.
How to do that when someone use night vision can see this men?

Owner123 06-24-2010 14:09

Re: visiblity only with nightvision
 
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <fakemeta>

new bool:gInvisibilty[33]
public 
plugin_init()
{
    
register_plugin("Blah blah blah""0.666""Owner")
    
register_forward(FM_AddToFullPack"fwAddToFullPack")
}

public 
fwAddToFullPack(ent_stateeenthosthostflagsplayerpSet)
{
    if(
gInvisibilty[e] && !cs_get_user_nvg(host))
        return 
FMRES_SUPERCEDE
    
    
return FMRES_IGNORED


And use set_entity_visibility(id, 1).

mati009988 06-24-2010 16:09

Re: visiblity only with nightvision
 
does not work and are lag on server

xPaw 06-24-2010 18:22

Re: visiblity only with nightvision
 
You want to make players visible only when they have nvg enabled?

zirualas 06-25-2010 02:17

Re: visiblity only with nightvision
 
He want see invisible peoples with nvg.


All times are GMT -4. The time now is 14:58.

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