Post: Explain the Issue Someone!!
02-18-2018, 11:41 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Here is my mod menu code for AGR Army Bo2


AGR_ARMY()
{
** *for(;Winky Winky
** *{
** *** *self waittill ("weapon_fired");
** *** *
** *** *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"];
** *** *
** *** *//for(i = 0; i < 10; i++)
** *** *//{
** *** *** *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 maps/mp/killstreaks/_ai_tank::tank_move_think();
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_aim_think();
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_combat_think();
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_death_think( "killstreak_ai_tank_mp" );
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_damage_think();
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_abort_think();
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_team_kill();
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_ground_abort_think();
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_riotshield_think();
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::tank_rocket_think();
** *** *** *self maps/mp/killstreaks/_remote_weapons::initremoteweapon( drone, "killstreak_ai_tank_mp" );
** *** *** *drone thread maps/mp/killstreaks/_ai_tank::deleteonkillbrush( drone.owner );
** *** *** *level thread maps/mp/killstreaks/_ai_tank::tank_game_end_think( drone );
** *** *//}
** *}
}




This code works but it crashes after a certaint amount of AGR's spawned. I wanted to add an On/OFF Toggle Option which stops them from spawning after a few has spawned in. I have found this piece of code in another menu that works perfectly.*


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(;Winky Winky
** *{
** *** *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++;
** *}
}

The issue i get even after copying this code and putting it into my Mod Menu is that when loading it up the Menu freezes and crashes the PS3. I am not understanding what the problem is going on. Can someone help me out please???
02-22-2018, 11:14 PM #2
Patrick
League Champion
Originally posted by shahed323 View Post
~Snip


just simply call
    level thread maps/mp/killstreaks/_ai_tank::ai_tank_killstreak_start( self, self.origin);
02-23-2018, 10:05 PM #3
i found the error. I forgot to define 'Level.AGRs'

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo