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

Enable, Remove, Give NightVision to players.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
proffs
Senior Member
Join Date: Jul 2013
Old 03-11-2014 , 04:29   Enable, Remove, Give NightVision to players.
Reply With Quote #1

Alright so I have this game where players get nightvision. I want the Nightvision to be activated on them when the game starts. And it does. But when ever the game stops, many players have their nightvison on and can't remove it.

When game starts, I give them and activate it on them:
PHP Code:
if (cs_get_user_team(id) == CS_TEAM_CT)
        {
            
give_item(id"weapon_knife")
            
cs_set_user_nvg(id,true);
            
//engclient_cmd(iPlayer, "nightvision");            
            
set_user_health(id1500);
            
set_user_maxspeed(idZOMBIE_SPEED);
            
engclient_cmd(id"nightvision");
        } 
And When I stop the game for CTs:
PHP Code:
if( g_ThermalOn[id] )
            {
                
engclient_cmd(id"nightvision");
                
cs_set_user_nvg(id,false);
            }
            else 
cs_set_user_nvg(id,false);
            
client_cmd(id"nightvision"); 
And for Terrorist:
PHP Code:
cs_set_user_nvg(idfalse);
            
client_cmd(id"nightvision"); 
Should I do it on a another way?
proffs is offline
proffs
Senior Member
Join Date: Jul 2013
Old 03-11-2014 , 04:47   Re: Enable, Remove, Give NightVision to players.
Reply With Quote #2

Never mind fixed it, thanks anyway lolz
proffs 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 05:24.


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