AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Request Fix for Nightvision thermal goggles (https://forums.alliedmods.net/showthread.php?t=344457)

eLLectro 11-09-2023 11:56

Request Fix for Nightvision thermal goggles
 
2 Attachment(s)
The thermal goggles plugin only works with the default nightvision of the biohazard mod, and there is no SMA for the default one, and the default one cannot be closed is always on, so I would like to combine the thermal googles plugin with another nightvision custom plugin.

Ace67 11-11-2023 10:53

Re: Request Fix for Nightvision thermal goggles
 
Quote:

Originally Posted by eLLectro (Post 2812671)
Hello! I have this bio_nightvision_final plugin for the biohazard mode that I want to use together with the thermal_goggles plugin, so that zombies can see people through walls when they are infected, But I have a problem, this nightvision is always ON and does not turn off if you press N so as it should be, I tried to use thermal_googles with other nightvisions but it only works with this one, Can someone combine these two ways? to go close when you press N because it is always on

Can you add this into your bio_nightvision

PHP Code:

// Nightvision toggle
public clcmd_nightvision(id)
{
    
// Toggle night vision
    
g_nvision[id] = !g_nvision[id];

    
// Custom nvg?
    
if (get_pcvar_num(cvar_cnvg))
    {
        
remove_task(id TASK_NVISION);
        if (
g_nvision[id])
            
set_task(0.1"set_user_nvision"id TASK_NVISION__"b");
        else
            
set_task(0.1"remove_user_nvision"id TASK_NVISION__"b");
    }
    else
    {
        
set_user_gnvision(idg_nvision[id]);
    }

    return 
PLUGIN_HANDLED;
}

// Remove Nightvision
public remove_user_nvision(taskid)
{
    
// Not meant to have nvision
    
if (!g_nvision[ID_NVISION] || !is_user_alive(ID_NVISION))
    {
        
// Task not needed anymore
        
remove_task(taskid);
        return;
    }

    
// Turn off Night Vision
    
set_user_gnvision(ID_NVISION0);



eLLectro 11-11-2023 15:19

Re: Request Fix for Nightvision thermal goggles
 
I'm very sorry, I expressed myself wrongly in the request, I wanted to say that the thermal goggles plugin only works with the default nightvision of the biohazard mod, and there is no SMA for the default one, and the default one cannot be closed is always on, so I would like to combine the thermal googles plugin with another nightvision custom plugin


All times are GMT -4. The time now is 10:37.

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