S
shahed323
Newbie
Hello there i am having an issue with the coding of toggling AGR Army for black ops II PS3 GSC Mod menu. The code below shows the code from a source of Jiggy Mod menu. This works fine on the Jiggy Menu. however i copied that code exactly the same onto my Mod menu and i have been having issues as the AGR does nto spawn in whilst in game. When i added this to my code and started the game. When i try to spawn in an AGR it says the max amount has spawned in. I dont understand what the problem is. Can someone explain or help me fix this. First time i am scripting a Menu. Thanks
Code:
AGR_ARMY_Toggle()
{
if(level.AGRs < 12)
{
if (self.AGR_ARMY == 0)
{
self thread AGR_ARMY();
self.AGR_ARMY = 1;
self iprintln("A.G.R Army [^6ON^7]");
self iprintln("^1Shoot to spawn A.G.Rs!");
}
else
{
self.AGR_ARMY = 0;
self notify("stopAGRARMY");
self iprintln("A.G.R Army [^1OFF^7]");
}
}
else
self iprintln("^1Max amount of A.G.Rs already spawned!");
}
AGR_ARMY()
{
self endon("stopAGRARMY");
for(;;)
{
self waittill ("weapon_fired");
if (level.AGRs > 11)
{
self iprintln("^1Max amount of A.G.Rs spawned!");
self notify("stopAGRARMY");
self.AGR_ARMY = 0;
}
else
direction = self GetPlayerAngles();
direction_vec = AnglesToForward( direction );
eye = self GetEye();
scale = 8000;
direction_vec = ( direction_vec[0] * scale, direction_vec[1] * scale, direction_vec[2] * scale );
trace = bullettrace( eye, eye + direction_vec, 0, undefined )["position"];
drone = spawnvehicle( "veh_t6_drone_tank", "talon", "ai_tank_drone_mp", trace, ( 0, 0, 1 ) );
drone setenemymodel( "veh_t6_drone_tank_alt" );
drone setvehicleavoidance( 1 );
drone setclientfield( "ai_tank_missile_fire", 4 );
drone setowner( self );
drone.owner = self;
drone.team = self.team;
drone.aiteam = self.team;
drone.type = "tank_drone";
drone setteam( self.team );
drone maps/mp/_entityheadicons::setentityheadicon( drone.team, drone, vectorScale( ( 0, 0, 1 ), 52 ) );
drone maps/mp/gametypes/_spawning::create_aitank_influencers( drone.team );
drone.controlled = 0;
drone makevehicleunusable();
drone.numberrockets = 99;
drone.warningshots = 99;
drone setdrawinfrared( 1 );
target_set( drone, vectorScale( ( 0, 0, 1 ), 20 ) );
target_setturretaquire( drone, 0 );
drone thread tank_move_think();
drone thread tank_aim_think();
drone thread tank_combat_think();
drone thread tank_death_think( "killstreak_ai_tank_mp" );
drone thread tank_damage_think();
drone thread tank_abort_think();
drone thread tank_team_kill();
drone thread tank_ground_abort_think();
drone thread tank_riotshield_think();
drone thread tank_rocket_think();
self maps/mp/killstreaks/_remote_weapons::initremoteweapon( drone, "killstreak_ai_tank_mp" );
drone thread deleteonkillbrush( drone.owner );
level thread tank_game_end_think( drone );
level.AGRs++;
}
}