Post: Auto-NAC Help
09-15-2015, 02:29 AM #1
Convive
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({});
    ToggleNac()
{
if(self.nac == "Disabled")
{
self.nac = "Enabled";
self iPrintln("^1Nac Swap Mod Enabled. ^7Press [{+actionslot 3}] And Switch Your Weapon And Repeat.");
self iPrintln("^1Press [{+actionslot 3}] ^7To Nac Swap To Your Other Weapon.");
self iPrintln("^1Press [{+actionslot 3}] ^7While Prone To Reset The Nac Mod.");
}
}

doNac() {
self endon("disconnect");
level endon("game_ended");
self endon("death");

if(self getCurrentWeapon() == self.wep2) {
self.ammo3 = self getWeaponAmmoClip(self getCurrentWeapon());
self.ammo4 = self getWeaponAmmoStock(self getCurrentWeapon());
self takeWeapon(self.wep2);
wait .05;
self giveWeapon(self.wep2, 0, true ( self.camo, 0, 0, 0, 0 ));
self setweaponammoclip( self.wep2, self.ammo3 );
self setweaponammostock( self.wep2, self.ammo4 );



}
else{
if(self getCurrentWeapon() == self.wep) {
self.ammo1 = self getWeaponAmmoClip(self getCurrentWeapon());
self.ammo2 = self getWeaponAmmoStock(self getCurrentWeapon());
self takeWeapon(self.wep);
wait .05;
self giveWeapon(self.wep, 0, true ( self.camo, 0, 0, 0, 0 ));
self setweaponammoclip( self.wep, self.ammo1 );
self setweaponammostock( self.wep, self.ammo2 );
}
}
}

checkNacWep() {
if(self.nacswap == "no"){
if(self.wep == "none")
{
self.wep = self getCurrentWeapon();
self iprintlnbold("^7Weapon ^1#1 ^7Set");
}
else
{
if(self.wep != "none" && self getCurrentWeapon() != self.wep && self getCurrentWeapon() != "none")
{
self.wep2 = self getCurrentWeapon();
self iprintlnbold("^7Weapon ^1#2 ^7Set");
self.nacswap = "yes";
wait .5;
self iprintln("^1Press [{+actionslot 3}] ^7while in prone to reset NAC Swap, in-case you want to switch classes mid-game.");
}
}
}
else
{
doNac();
}
}


This is the code im using it works but whenever i try and use it it brings up the wired combat knife glitch you can do with the glitch ctf gamemode
(adsbygoogle = window.adsbygoogle || []).push({});
09-15-2015, 02:34 AM #2
itsSorrow
In my man cave
self.camo = 45; put that in on playerspawned
09-15-2015, 02:42 AM #3
Convive
Bounty hunter
Originally posted by GentleSlugger View Post
self.camo = 45; put that in on playerspawned


Nope doesnt work.
09-15-2015, 02:44 AM #4
itsSorrow
In my man cave
Originally posted by Zaroff View Post
Nope doesnt work.


ik thats devours & it works m9
09-15-2015, 02:45 AM #5
Convive
Bounty hunter
Originally posted by GentleSlugger View Post
ik thats devours & it works m9


if your ps3 you could join my game or i could just post hole code and see if i did anything wronge
09-15-2015, 02:46 AM #6
itsSorrow
In my man cave
Originally posted by Zaroff View Post
if your ps3 you could join my game or i could just post hole code and see if i did anything wronge


post the whole code
09-15-2015, 02:48 AM #7
Convive
Bounty hunter
Originally posted by GentleSlugger View Post
post the whole code


    /*
* Black Ops 2 - GSC Studio by iMCSx
*
* Creator : Zaroff
* Project : Binds
* Mode : Multiplayer
* Date : 2015/09/10 - 14:12:32
*
*/

#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;

init()
{
level.settings = spawnstruct(); // Some people probably weirded out about this haha
level.settings.ebscale = 200;
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self MonitorButtons();
self.camo = 45;
}
}


//Binds
MonitorButtons()
{
self endon("disconnect");

for(;Winky Winky
{
if(self actionslotthreebuttonpressed() && self GetStance() == "crouch")//dpad left
{
self thread checkNacWep();
wait .12;
}
if(self actionslotonebuttonpressed() && self GetStance() == "crouch")//dpad up
{
self thread toggleEB();
wait .12;
}
wait .05;
}
}


ToggleEBScale()
{
level.settings.ebscale += 250;
if(level.settings.ebscale > 2000)
level.settings.ebscale = 0;
}
//Nac Swap
ToggleNac()
{
if(self.nac == "Disabled")
{
self.nac = "Enabled";
self iPrintln("^1Nac Swap Mod Enabled. ^7Press [{+actionslot 3}] And Switch Your Weapon And Repeat.");
self iPrintln("^1Press [{+actionslot 3}] ^7To Nac Swap To Your Other Weapon.");
self iPrintln("^1Press [{+actionslot 3}] ^7While Prone To Reset The Nac Mod.");
}
}

doNac() {
self endon("disconnect");
level endon("game_ended");
self endon("death");

if(self getCurrentWeapon() == self.wep2) {
self.ammo3 = self getWeaponAmmoClip(self getCurrentWeapon());
self.ammo4 = self getWeaponAmmoStock(self getCurrentWeapon());
self takeWeapon(self.wep2);
wait .05;
self giveWeapon(self.wep2, 0, true ( self.camo, 0, 0, 0, 0 ));
self setweaponammoclip( self.wep2, self.ammo3 );
self setweaponammostock( self.wep2, self.ammo4 );



}
else{
if(self getCurrentWeapon() == self.wep) {
self.ammo1 = self getWeaponAmmoClip(self getCurrentWeapon());
self.ammo2 = self getWeaponAmmoStock(self getCurrentWeapon());
self takeWeapon(self.wep);
wait .05;
self giveWeapon(self.wep, 0, true ( self.camo, 0, 0, 0, 0 ));
self setweaponammoclip( self.wep, self.ammo1 );
self setweaponammostock( self.wep, self.ammo2 );
}
}
}

checkNacWep() {
if(self.nacswap == "no"){
if(self.wep == "none")
{
self.wep = self getCurrentWeapon();
self iprintlnbold("^7Weapon ^1#1 ^7Set");
}
else
{
if(self.wep != "none" && self getCurrentWeapon() != self.wep && self getCurrentWeapon() != "none")
{
self.wep2 = self getCurrentWeapon();
self iprintlnbold("^7Weapon ^1#2 ^7Set");
self.nacswap = "yes";
wait .5;
self iprintln("^1Press [{+actionslot 3}] ^7while in prone to reset NAC Swap, in-case you want to switch classes mid-game.");
}
}
}
else
{
doNac();
}
}
// EB Ranges
toggleEB()
{
if(self.Range == "Off")
{
self notify("NewRange");
self thread radiusShot(150);
self.Range = "150";
}
else if(self.Range == "150")
{
self notify("NewRange");
self thread radiusShot(o);
self.Range = "Off";
}
}

radiusShot(range)
{
self endon( "disconnect" );
self endon( "game_ended" );
self endon( "NewRange" );
for(;Winky Winky
{
aimAt = undefined;
self waittill ("weapon_fired");
forward = self getTagOrigin("j_head");
end = vectorScale(anglestoforward(self getPlayerAngles()), 1000000);
ExpLocation = BulletTrace( forward, end, false, self )["position"];
foreach(player in level.players)
{
if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
continue;
if(isDefined(aimAt))
{
if(closer(ExpLocation, player getTagOrigin("pelvis"), aimAt getTagOrigin("pelvis")))
aimAt = player;
}
else aimAt = player;
}
if(distance( aimAt.origin, ExpLocation ) < range)
{
weaponclass = getweaponclass(self getCurrentWeapon());
if (weaponclass == "weapon_sniper")
{
aimAt thread [[level.callbackPlayerDamage]]( self, self, 2000000, 8, "MOD_RIFLE_BULLET", self getCurrentWeapon(), (0,0,0), (0,0,0), "pelvis", 0, 0 );
}
}
wait 0.05;
}
}






09-15-2015, 02:56 AM #8
itsSorrow
In my man cave
here

    
ToggleNac()
{
if(!self.nac)
{
self.nac = true;
self iPrintln("^1Nac Swap Mod Enabled. ^7Press [{+actionslot 3}] And Switch Your Weapon And Repeat.");
self iPrintln("^1Press [{+actionslot 3}] ^7To Nac Swap To Your Other Weapon.");
self iPrintln("^1Press [{+actionslot 3}] ^7While Prone To Reset The Nac Mod.");
}
else
{
self.nac = false;
self notify("byebyenac");
self iPrintln("^1Nac Swap Mod Disabled");
}
}

doNac()
{
self endon("disconnect");
level endon("game_ended");
self endon("death");
self endon("byebyenac");
if(self getCurrentWeapon() == self.wep2)
{
self takeWeapon(self.wep2);
wait .05;
self giveWeapon(self.wep2, 0, true ( self.camo, 0, 0, 0, 0 ));
}
else
{
self.ammo2 = self getWeaponAmmoStock(self getCurrentWeapon());
self takeWeapon(self.wep);
wait .05;
self giveWeapon(self.wep, 0, true ( self.camo, 0, 0, 0, 0 ));
}
}

checkNacWep()
{
if(self.nacswap == "no")
{
if(self.wep == "none")
{
self.wep = self getCurrentWeapon();
self iprintlnbold("Primary ^1Weapon Set");
}
else if(self.wep != "none" && self getCurrentWeapon() != self.wep && self getCurrentWeapon() != "none")
{
self.wep2 = self getCurrentWeapon();
self iprintlnbold("Secondary ^1Weapon Set");
self.nacswap = "yes";
wait .5;
self iprintln("^1Press [{+actionslot 3}] ^7while in prone to reset NAC Swap, in-case you want to switch classes mid-game.");
}
}
else
{
doNac();
}
}


idk i just made the toggle 2 my likings xD idk its wrking for me
09-15-2015, 02:57 AM #9
itsSorrow
In my man cave
idk try adding
#include maps\mp\gametypes\_globallogic;
#include maps\mp\gametypes\_globallogic_score;
09-15-2015, 03:04 AM #10
Convive
Bounty hunter
Originally posted by GentleSlugger View Post
idk try adding
#include maps\mp\gametypes\_globallogic;
#include maps\mp\gametypes\_globallogic_score;


still not whatabout is it setup in the binds right?

The following user thanked Convive for this useful post:

itsSorrow

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo