Raised This Month: $ Target: $400
 0% 

block nvg buying


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 05-15-2005 , 03:23   block nvg buying
Reply With Quote #1

i tried this code

Code:
 public cmdnvgblock()  {      if (get_cvar_num ("dark_allownvg") == 0 )           return PLUGIN_CONTINUE            return PLUGIN_HANDLED  }

the registered command is this:
Code:
    register_clcmd("nvgs", "cmdnvgblock")

somehow, it doesn't work. any idea?
__________________
Plugins:
none

n0obie4life is offline
sambro
Member
Join Date: May 2005
Old 05-15-2005 , 05:27  
Reply With Quote #2

Try just hooking the NVGToggle event.

If they turn their NVG on, turn it back off automatically.

Code:
 register_event("NVGToggle", "blockNVG", "1=1");

The 1=1 flag means the blockNVG function will only get called if the user turned their NVG on. If you did 1=2, then it would get called when NVG got turned off, which is useless in this case
sambro is offline
Send a message via MSN to sambro
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 05-16-2005 , 09:31  
Reply With Quote #3

nope doesn't work.
__________________
Plugins:
none

n0obie4life 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 16:41.


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