AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   addtofullpack doesn't work right (https://forums.alliedmods.net/showthread.php?t=87840)

Hunter-Digital 03-17-2009 05:38

addtofullpack doesn't work right
 
PHP Code:

public fw_addtofullpack(es_handleeenthosthostflagsplayerpSet)
{
    if(!
player || !is_user_alive(host) || iTeam == || bVision[host] == false)
        return 
FMRES_IGNORED
 
    set_es
(es_handleES_EffectsEF_BRIGHTLIGHT)
 
    return 
FMRES_IGNORED


The problem is when I turn my "nightvision" on (so that the brightlight will "spawn" on me) I can se other player's light also, even if they do NOT have it activated... how can I sepparate this ? for the brightlight to appear only to that player and only HIS brightlight to see ?

TheRadiance 03-17-2009 08:20

Re: addtofullpack doesn't work right
 
This is a working script, but with opened nightvision it's very hard to see this BRIGHTLIGHT, try to use another effect:
PHP Code:

#include < amxmodx >
#include < fakemeta >

#define VERSION "1.0"

new g_iNvg33 ]

public 
plugin_init()
{
    
register_plugin"Brightlight"VERSION"Hunter-Digital" )
    
register_event"NVGToggle""EventNvgToggle""be" )
    
register_forwardFM_AddToFullPack"ForwardAddToFullPackPost")
}

public 
EventNvgToggleid )
    
g_iNvgid ] = read_data)

public 
ForwardAddToFullPackPostes_handleeenthosthostflagsplayerpSet )
{
    if ( !
player || !is_user_alivehost ) || !g_iNvghost ] )
        return 
FMRES_IGNORED

    
if ( ent != host )
        
set_es(es_handleES_EffectsEF_BRIGHTLIGHT )

    return 
FMRES_IGNORED



SchlumPF* 03-17-2009 08:54

Re: addtofullpack doesn't work right
 
"but with opened nightvision it's very hard to see this BRIGHTLIGHT, try to use another effect:"

PHP Code:

new g_bNightVision[33];

// ...

register_clcmd"nightvision""cmdNightVision" );

// ...

public cmdNightVisionplr )
{
    
g_bNightVision[plr] = !g_bNightVision[plr];
    return 
PLUGIN_HANDLED;



Hunter-Digital 03-17-2009 09:06

Re: addtofullpack doesn't work right
 
It's actually reverse, the ent must be equal to the host for this thing to work as I need it to, thanks for the boost :}

also thanks anyway schlumpf, I already am blocking the original nightvision :P


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

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