Raised This Month: $51 Target: $400
 12% 

Request Fix for Nightvision thermal goggles


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eLLectro
Junior Member
Join Date: Nov 2023
Old 11-09-2023 , 11:56   Request Fix for Nightvision thermal goggles
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (thermal_goggles.sma - 56 views - 2.9 KB)
File Type: sma Get Plugin or Get Source (bio_nightvision_final.sma - 60 views - 4.4 KB)

Last edited by eLLectro; 11-12-2023 at 15:06.
eLLectro is offline
Ace67
Senior Member
Join Date: Sep 2020
Location: France
Old 11-11-2023 , 10:53   Re: Request Fix for Nightvision thermal goggles
Reply With Quote #2

Quote:
Originally Posted by eLLectro View Post
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);

__________________
CS:CZ > CS 1.6

Last edited by Ace67; 11-11-2023 at 10:55.
Ace67 is offline
eLLectro
Junior Member
Join Date: Nov 2023
Old 11-11-2023 , 15:19   Re: Request Fix for Nightvision thermal goggles
Reply With Quote #3

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
eLLectro 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 01:37.


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