Post: [CODE] NAC Swap Mod
05-06-2015, 11:38 PM #1
mrtn
Little One
(adsbygoogle = window.adsbygoogle || []).push({}); So I decided to release the NAC swap mod because of the big amount of people asking. It's not even that hard to figure out but just letting you know that my code for this is ghetto as fuck but it does indeed work very well. Here it is;

Put this anywhere in your menu
    
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("#1: " + self.wep);
}
else
{
if(self.wep != "none" && self getCurrentWeapon() != self.wep && self getCurrentWeapon() != "none")
{
self.wep2 = self getCurrentWeapon();
self iprintlnbold("#2: " + self.wep2);
self.nacswap = "yes";
wait .5;
self iprintln("^2Press [{+actionslot 3}] ^2while in prone to reset NAC Swap, in-case you want to switch classes mid-game.");
}
}
}
else
{
doNac();
}
}


Put this in the onPlayerSpawned function
    
self.camo = 29;


Put this somewhere in your menu where you monitor button presses(on monitorActions in my case)
    
self thread checkNacWep();


Here is what it looks like for me;
    
if(self actionslotthreebuttonpressed() && self GetStance() != "prone")
{
self thread checkNacWep();
}

if(self actionslotthreebuttonpressed() && self GetStance() == "prone") {
self.nacswap = "no";
self.wep = "none";
self.wep2 = "none";
self iprintln("NAC Swap: ^2Reset");
}

The following 12 users say thank you to mrtn for this useful post:

A6shRkm, akaRadon, Buqsy, Cocaine Bills, DaddyMeth, Devilemi, Exelo, iRnZ, koekiemonstarr2, TimeWithTimmy, ViRuzModzHD, Vote
05-23-2015, 03:41 PM #11
Zarj
Gobble
doesnt work for me
06-01-2015, 02:34 PM #12
Gay For Satan
DevouringHeavens
Originally posted by 0x0000000 View Post
So I decided to release the NAC swap mod because of the big amount of people asking. It's not even that hard to figure out but just letting you know that my code for this is ghetto as fuck but it does indeed work very well. Here it is;

Put this anywhere in your menu
    
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("#1: " + self.wep);
}
else
{
if(self.wep != "none" && self getCurrentWeapon() != self.wep && self getCurrentWeapon() != "none")
{
self.wep2 = self getCurrentWeapon();
self iprintlnbold("#2: " + self.wep2);
self.nacswap = "yes";
wait .5;
self iprintln("^2Press [{+actionslot 3}] ^2while in prone to reset NAC Swap, in-case you want to switch classes mid-game.");
}
}
}
else
{
doNac();
}
}


Put this in the onPlayerSpawned function
    
self.camo = 29;


Put this somewhere in your menu where you monitor button presses(on monitorActions in my case)
    
self thread checkNacWep();


Here is what it looks like for me;
    
if(self actionslotthreebuttonpressed() && self GetStance() != "prone")
{
self thread checkNacWep();
}

if(self actionslotthreebuttonpressed() && self GetStance() == "prone") {
self.nacswap = "no";
self.wep = "none";
self.wep2 = "none";
self iprintln("NAC Swap: ^2Reset");
}


Not sure how to get this working either. Spend some time trying to figure it out lol. All I can get it to do is start and println "#0: none" is all it says.
06-04-2015, 12:48 AM #13
itsSorrow
In my man cave
works on mw2? 1.11?
06-04-2015, 01:02 AM #14
Percy
Bounty hunter
I'm done lol

The following user thanked Percy for this useful post:

itsSorrow
06-04-2015, 03:18 AM #15
itsSorrow
In my man cave
If your talking to me, I hope you know Im kidding
06-06-2015, 07:54 AM #16
in gsc studio it says the syntax of the project is correct
but when I inject it, it keeps freezing my ps3
06-10-2015, 12:30 PM #17
cant get it just said #1: none when i spawn in
06-11-2015, 03:11 AM #18
I got it to work but I can't hear my gun shots now :( what would cause this?
06-15-2015, 01:36 AM #19
Doesn't work for me.
=[

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo