Raised This Month: $32 Target: $400
 8% 

Block flashlight and nightvision for bots


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Apb hq
Senior Member
Join Date: Apr 2014
Old 08-07-2019 , 04:32   Block flashlight and nightvision for bots
Reply With Quote #1

Hi as i have requested here can someone make a plugin which will block flashlight and nightvision use for bots thanks in advance
Apb hq is offline
Dragos
Senior Member
Join Date: Oct 2018
Location: Romania
Old 08-07-2019 , 08:19   Re: Block flashlight and nightvision for bots
Reply With Quote #2

But flashlight IDK if it works =]]


PHP Code:
/*
Have a nice day now
*/


#include <amxmodx>
#include <cstrike>


new const g_PLUGIN[] = "disable NVG Light"
new const g_VERSION[] = "-"
new const g_AUTHOR[] = "Dragos"


new bool:NightVisionUse[33]

new 
pnable

public plugin_init() 
{
    
register_plugin(g_PLUGIN,g_VERSION,g_AUTHOR);
    
    
register_concmd("nightvision","ToggleNVG")
    
register_concmd("flashlight","ToggleFl")
    
    
register_concmd("-ngvadjust","ngv_off")
    
register_concmd("+ngvadjust","ngv_on")
    
    
register_concmd("bind n nightvision""ngv_block");
    
    
pnable register_cvar("custom_nvg","1");
}

public 
ngv_off(id) {
return 
PLUGIN_CONTINUE;
}

public 
ngv_on(id) {
return 
PLUGIN_CONTINUE;
}

public 
ngv_block(id) {
return 
PLUGIN_CONTINUE;
}
public 
ToggleNVG(id

    
   if(
get_pcvar_num(pnable) == 0)
   return 
PLUGIN_CONTINUE;
   
   if ( (
NightVisionUse[id]) || !cs_get_user_nvg(id)) StopNVG(id
   
   else 
StartNVG(id

   return 
PLUGIN_HANDLED


public 
ToggleFl(id)

   return 
PLUGIN_HANDLED


public 
StartNVG(id

   return 
PLUGIN_HANDLED;



public 
StopNVG(id
{
   return 
PLUGIN_HANDLED;

__________________
sup

Last edited by Dragos; 08-09-2019 at 03:12.
Dragos is offline
bad_boy
Member
Join Date: Oct 2018
Old 08-07-2019 , 08:33   Re: Block flashlight and nightvision for bots
Reply With Quote #3

Which bots are you using?
bad_boy is offline
Dragos
Senior Member
Join Date: Oct 2018
Location: Romania
Old 08-07-2019 , 08:33   Re: Block flashlight and nightvision for bots
Reply With Quote #4

Quote:
Originally Posted by bad_boy View Post
Which bots are you using?
single player
__________________
sup

Last edited by Dragos; 08-07-2019 at 08:39.
Dragos is offline
Dragos
Senior Member
Join Date: Oct 2018
Location: Romania
Old 08-07-2019 , 08:37   Re: Block flashlight and nightvision for bots
Reply With Quote #5

Quote:
Originally Posted by Apb hq View Post
Hi as i have requested here can someone make a plugin which will block flashlight and night vision use for bots thanks in advance
I thing he means about play with bots on lan
__________________
sup
Dragos is offline
bad_boy
Member
Join Date: Oct 2018
Old 08-07-2019 , 08:50   Re: Block flashlight and nightvision for bots
Reply With Quote #6

I understand. I only asked because if he's using podbots he can block them from buying nightvision.
bad_boy is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 08-07-2019 , 12:09   Re: Block flashlight and nightvision for bots
Reply With Quote #7

See the code

PHP Code:
/*
Have a nice day now
*/


#include <amxmodx>
#include <cstrike>


new const g_PLUGIN[] = "disable NVG Light"
new const g_VERSION[] = "-"
new const g_AUTHOR[] = "Dragos"


new bool:NightVisionUse[33]

new 
pnable

public plugin_init() 
{
    
register_plugin(g_PLUGIN,g_VERSION,g_AUTHOR);
    
    
register_concmd("nightvision","ToggleNVG")
    
register_concmd("flashlight","ToggleFl")
    
    
register_concmd("-ngvadjust","ngv_off")
    
register_concmd("+ngvadjust","ngv_on")
    
////  register_concmd("bind f" /// this line 
    
    
register_concmd("bind n nightvision""ngv_block");
    
    
pnable register_cvar("custom_nvg","1");
}

public 
ngv_off(id) {
return 
PLUGIN_CONTINUE;
}

public 
ngv_on(id) {
return 
PLUGIN_CONTINUE;
}

public 
ngv_block(id) {
return 
PLUGIN_CONTINUE;
}
public 
ToggleNVG(id

    
   if(
get_pcvar_num(pnable) == 0)
   return 
PLUGIN_CONTINUE;
   
   if ( (
NightVisionUse[id]) || !cs_get_user_nvg(id)) StopNVG(id
   
   else 
StartNVG(id

   return 
PLUGIN_HANDLED


public 
ToggleFl(id)

   return 
PLUGIN_HANDLED


public 
StartNVG(id

   return 
PLUGIN_HANDLED;



public 
StopNVG(id
{
   return 
PLUGIN_HANDLED;

[/QUOTE]
__________________
SED LYF !!!
SHIELD755 is offline
Apb hq
Senior Member
Join Date: Apr 2014
Old 08-08-2019 , 12:04   Re: Block flashlight and nightvision for bots
Reply With Quote #8

Quote:
Originally Posted by SHIELD755 View Post
See the code

PHP Code:
/*
Have a nice day now
*/


#include <amxmodx>
#include <cstrike>


new const g_PLUGIN[] = "disable NVG Light"
new const g_VERSION[] = "-"
new const g_AUTHOR[] = "Dragos"


new bool:NightVisionUse[33]

new 
pnable

public plugin_init() 
{
    
register_plugin(g_PLUGIN,g_VERSION,g_AUTHOR);
    
    
register_concmd("nightvision","ToggleNVG")
    
register_concmd("flashlight","ToggleFl")
    
    
register_concmd("-ngvadjust","ngv_off")
    
register_concmd("+ngvadjust","ngv_on")
    
////  register_concmd("bind f" /// this line 
    
    
register_concmd("bind n nightvision""ngv_block");
    
    
pnable register_cvar("custom_nvg","1");
}

public 
ngv_off(id) {
return 
PLUGIN_CONTINUE;
}

public 
ngv_on(id) {
return 
PLUGIN_CONTINUE;
}

public 
ngv_block(id) {
return 
PLUGIN_CONTINUE;
}
public 
ToggleNVG(id

    
   if(
get_pcvar_num(pnable) == 0)
   return 
PLUGIN_CONTINUE;
   
   if ( (
NightVisionUse[id]) || !cs_get_user_nvg(id)) StopNVG(id
   
   else 
StartNVG(id

   return 
PLUGIN_HANDLED


public 
ToggleFl(id)

   return 
PLUGIN_HANDLED


public 
StartNVG(id

   return 
PLUGIN_HANDLED;



public 
StopNVG(id
{
   return 
PLUGIN_HANDLED;

[/QUOTE]

I am using podbots but in fact because of the zombie mod bots get the nightvision and they are spamming a lot, i have seen your code but if i'm not mistaken this will block the nightvision command for everyone there is no bot check ? i need the plugin only for podbots
Apb hq is offline
Dragos
Senior Member
Join Date: Oct 2018
Location: Romania
Old 08-09-2019 , 03:12   Re: Block flashlight and nightvision for bots
Reply With Quote #9

Quote:
Originally Posted by SHIELD755 View Post
See the code

PHP Code:
/*
Have a nice day now
*/


#include <amxmodx>
#include <cstrike>


new const g_PLUGIN[] = "disable NVG Light"
new const g_VERSION[] = "-"
new const g_AUTHOR[] = "Dragos"


new bool:NightVisionUse[33]

new 
pnable

public plugin_init() 
{
    
register_plugin(g_PLUGIN,g_VERSION,g_AUTHOR);
    
    
register_concmd("nightvision","ToggleNVG")
    
register_concmd("flashlight","ToggleFl")
    
    
register_concmd("-ngvadjust","ngv_off")
    
register_concmd("+ngvadjust","ngv_on")
    
    
register_concmd("bind n nightvision""ngv_block");
    
    
pnable register_cvar("custom_nvg","1");
}

public 
ngv_off(id) {
return 
PLUGIN_CONTINUE;
}

public 
ngv_on(id) {
return 
PLUGIN_CONTINUE;
}

public 
ngv_block(id) {
return 
PLUGIN_CONTINUE;
}
public 
ToggleNVG(id

    
   if(
get_pcvar_num(pnable) == 0)
   return 
PLUGIN_CONTINUE;
   
   if ( (
NightVisionUse[id]) || !cs_get_user_nvg(id)) StopNVG(id
   
   else 
StartNVG(id

   return 
PLUGIN_HANDLED


public 
ToggleFl(id)

   return 
PLUGIN_HANDLED


public 
StartNVG(id

   return 
PLUGIN_HANDLED;



public 
StopNVG(id
{
   return 
PLUGIN_HANDLED;

[/QUOTE]


Yeah I make a mistake =]] edited*
__________________
sup

Last edited by Dragos; 08-09-2019 at 03:13.
Dragos 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 22:23.


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