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(id, 1500);
set_user_maxspeed(id, ZOMBIE_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(id, false);
client_cmd(id, "nightvision");
Should I do it on a another way?