Raised This Month: $ Target: $400
 0% 

Block nvg on round end, take from player nightvision.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-26-2008 , 04:58   Block nvg on round end, take from player nightvision.
Reply With Quote #1

PHP Code:
public event_round_end()
{
       if (
cs_get_user_nvg(id))
       {
        
Took from he nightvision
       
}


Last edited by xbatista; 12-26-2008 at 05:51.
xbatista is offline
Send a message via Skype™ to xbatista
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 12-26-2008 , 05:50   Re: Block nvg on round end, take from player nightvision.
Reply With Quote #2

You can't check nvg like that, you have to loop all players and then use the player id, ofc with this too.
Code:
cs_set_user_nvg(id, 0)
Something like this:

Code:
public function()
{
 new players[32], num
 get_players(players, num)
 
 new player;
 for(new i = 0; i < num; i++)
 {
  player = players[i]
  if(cs_get_user_nvg(id) == 1)
      cs_set_user_nvg(id, 0);
}
}

Last edited by SnoW; 12-26-2008 at 05:53.
SnoW is offline
Send a message via MSN to SnoW
Old 12-26-2008, 05:53
xbatista
This message has been deleted by xbatista. Reason: Oops
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 12-26-2008 , 05:54   Re: Block nvg on round end, take from player nightvision.
Reply With Quote #3

Ok thx ;)
xbatista is offline
Send a message via Skype™ to xbatista
Old 12-26-2008, 05:57
SnoW
This message has been deleted by SnoW. Reason: Well, ye editing posts...
Reply


Thread Tools
Display Modes

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 09:04.


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