Raised This Month: $ Target: $400
 0% 

Nightvision NEED SMALL HELP!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-14-2014 , 00:17   Re: Nightvision NEED SMALL HELP!
Reply With Quote #1

Try this :

Instead of remove_user_nvg, use set_user_nvg(id, 0)
To force nvg ON, use set_user_nvg(id, 1, 1)

PHP Code:
const HAS_NVGS 1<<0;
const 
USES_NVGS 1<<8;
const 
OFFSET_NVGOGGLES 129;
const 
m_flNextNightVisionTime 619

set_user_nvg(idnvgoggles 0turnon 0)
{
    new 
nvg get_pdata_int(idOFFSET_NVGOGGLES);
    if( 
nvgoggles )
    {
        if( 
nvg HAS_NVGS )
        {
            if( 
turnon && ~nvg USES_NVGS )
            {
                
force_client_use_nvg(id);
            }
        }
        else
        {
            
set_pdata_int(idOFFSET_NVGOGGLESHAS_NVGS);
            
force_client_use_nvg(id);
        }
    }
    else
    {
        if( 
nvg HAS_NVGS )
        {
            if( 
nvg USES_NVGS )
            {
                
force_client_use_nvg(id);
            }
            
set_pdata_int(OFFSET_NVGOGGLES0);
        }
    }
}

force_client_use_nvg(id)
{
    
set_pdata_float(idm_flNextNightVisionTime0.0);
    
engclient_cmd(id"nightvision");

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-14-2014 at 00:18.
ConnorMcLeod 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 10:12.


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