/*
* Black Ops 2 - GSC Studio by iMCSx
*
* Creator : Ketsugan
* Project : teste donac()
* Mode : Multiplayer
* Date : 2015/04/15 - 13:13:36
*
*/
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for(;
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;
{
self waittill("spawned_player");
// Will appear each time when the player spawn, that's just an exemple.
self iprintln("do nac test");
self.getpw = false;
self.getsw = false;
self.npr = false;
self thread donac();
}
}
donac() {
self endon("death");
self endon("disconnect");
for(;
{
if(!self.npr) { //selecting weapons
if(!self.getpw) {
if(self actionSlotThreeButtonPressed()) {
Primaryname = self getCurrentWeapon();
self iPrintLnBold("^6#1: " + Primaryname);
self.getpw = true;
}
}
if(!self.getsw && self.getpw) {
if(self actionSlotThreeButtonPressed()) {
Secondname = self getCurrentWeapon();
self iPrintLnBold("^6#2: " + Secondname);
self.getsw = true;
}
}
if(self.getpw && self.getsw)
self.npr = true;
}
else { //insta
if (self actionSlotThreeButtonPressed()) {
currentWeapon = self getCurrentWeapon();
if (currentWeapon == Primaryname)
self vainac(Primaryname, Secondname);
else if (currentWeapon == Secondname)
self vainac(Secondname, Primaryname);
wait 0.1;
}
}
}
}
vainac(weapa, weapb) {
amcl = self getWeaponAmmoClip(weapa);
amst = self getWeaponAmmoStock(weapa);
self takeweapon(weapa);
self switchToWeapon(weapb);
wait 0.05;
self giveWeapon(weapa);
self setWeaponAmmoClip(weapa, amcl);
self setWeaponAmmoStock(weapa, amst);
}
donac()
{
self endon("death");
self endon("disconnect");
for(;
{
if(!self.npr)
{ //selecting weapons
if(!self.getpw)
{
if(self actionSlotThreeButtonPressed())
{
Primaryname = self getCurrentWeapon();
self iPrintLnBold("^6#1: " + Primaryname);
self.getpw = true;
}
}
if(!self.getsw && self.getpw)
{
if(self actionSlotThreeButtonPressed())
{
Secondname = self getCurrentWeapon();
self iPrintLnBold("^6#2: " + Secondname);
self.getsw = true;
}
}
if(self.getpw && self.getsw)
self.npr = true;
}
else
{ //insta
if (self actionSlotThreeButtonPressed())
{
currentWeapon = self getCurrentWeapon();
if (currentWeapon == Primaryname)
self vainac(Primaryname, Secondname);
else if (currentWeapon == Secondname)
self vainac(Secondname, Primaryname);
wait 0.1;
}
}
wait .05;
}
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.