Post: Night Vision (cod 4 one, not custom)
02-23-2012, 01:27 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); found this while looking through stuff to put in infected :P

Add this to onplayerspawned()
    
self.night = 0;


Add this to Menu:
    
self thread toggleNV();


Here's the code Winky Winky
    
toggleNV()
{
for(;Winky Winky
if(self.night == 0)
{
self _SetActionSlot( 1, "nightvision" );
self iPrintlnBold("Nightvision: ^2ON");
self.night = 1;
break;
}
if(self.night == 1)
{
self _SetActionSlot( 1, "none" );
self iPrintlnBold("Nightvision: ^1OFF");
self.night = 0;
break;
}
}
}


so basically after you turn it on...

anytime you press UP on the dpad you get cod 4 nightvision, not some made up code Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({});
02-23-2012, 10:20 AM #2
Originally posted by SatanicHispanic View Post
found this while looking through stuff to put in infected :P

Add this to onplayerspawned()
    
self.night = 0;


Add this to Menu:
    
self thread toggleNV();


Here's the code Winky Winky
    
toggleNV()
{
for(;Winky Winky
if(self.night == 0)
{
self _SetActionSlot( 1, "nightvision" );
self iPrintlnBold("Nightvision: ^2ON");
self.night = 1;
break;
}
if(self.night == 1)
{
self _SetActionSlot( 1, "none" );
self iPrintlnBold("Nightvision: ^1OFF");
self.night = 0;
break;
}
}
}


so basically after you turn it on...

anytime you press UP on the dpad you get cod 4 nightvision, not some made up code Winky Winky


have you tested this? i thought it was removed on the games release.
02-23-2012, 12:32 PM #3
Originally posted by ViiPeR View Post
have you tested this? i thought it was removed on the games release.


I tested on PC and it works, so I would assume it does on console
02-23-2012, 01:51 PM #4
247Yamato
< ^ > < ^ >
This is quite old, and yes it works. I dont understand very well the toggle and then the loop you made there, :S

The following user thanked 247Yamato for this useful post:

iTruceFret
02-23-2012, 05:47 PM #5
Originally posted by 247Yamato View Post
This is quite old, and yes it works. I dont understand very well the toggle and then the loop you made there, :S


Yeah for mpgh users :P

And that's how I make my toggles I have no other idea how haha
02-23-2012, 07:55 PM #6
247Yamato
< ^ > < ^ >
Originally posted by SatanicHispanic View Post
Yeah for mpgh users :P

And that's how I make my toggles I have no other idea how haha


I thought that just with this is enough to have the toggler:

    self _SetActionSlot( 1, "nightvision" );


Your toggle code is weird, because once you switch to the other option you destroy the loop with those breaks; , so, it only works once

The following 2 users say thank you to 247Yamato for this useful post:

aerosoul94, Cody_h4x
02-23-2012, 09:56 PM #7
Originally posted by 247Yamato View Post
I thought that just with this is enough to have the toggler:

    self _SetActionSlot( 1, "nightvision" );


Your toggle code is weird, because once you switch to the other option you destroy the loop with those breaks; , so, it only works once


nooo :P it breaks the loop and then next time you open the mod it goes to the other one b/c of the variable.
02-23-2012, 09:57 PM #8
Originally posted by 247Yamato View Post
I thought that just with this is enough to have the toggler:

    self _SetActionSlot( 1, "nightvision" );


Your toggle code is weird, because once you switch to the other option you destroy the loop with those breaks; , so, it only works once


and the reason is if you don't want it. just something useful I guess :P
02-23-2012, 09:57 PM #9
Originally posted by 247Yamato View Post
I thought that just with this is enough to have the toggler:

    self _SetActionSlot( 1, "nightvision" );


Your toggle code is weird, because once you switch to the other option you destroy the loop with those breaks; , so, it only works once


and the reason is if you don't want it. just something useful I guess :P

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo