exario
Veteran
- Messages
- 7
- Reaction score
- 1
- Points
- 778
Hello, I am kinda new to modding and scripting.
However I wanted to try and make a zombies mod menu for black ops 2.
I have downloaded a menu base from the site and kinda got the hang of it, but now i have got a error when trying to inject to test the menu named "bad syntax error on line 615". But when i mark out that code it then goes on to the next function i have added and also says that's a bad syntax, so i would like to ask if some one would help me fix this!
Also when i only had god mode added, that function(option) worked fine, but now that i added unlimited ammo and other options i get this error?!
This is my sub menu options:
Funtions for Menu options:
However I wanted to try and make a zombies mod menu for black ops 2.
I have downloaded a menu base from the site and kinda got the hang of it, but now i have got a error when trying to inject to test the menu named "bad syntax error on line 615". But when i mark out that code it then goes on to the next function i have added and also says that's a bad syntax, so i would like to ask if some one would help me fix this!
Also when i only had god mode added, that function(option) worked fine, but now that i added unlimited ammo and other options i get this error?!
This is my sub menu options:
Code:
self MainMenu("Main Mods", "^1Extinction Menu Beta");
self MenuOption("Main Mods", 0, "God Mode", ::toggle_god);
self MenuOption("Main Mods", 1, "Unlimited Ammo", ::Test);
self MenuOption("Main Mods", 2, "Third Person", ::toggle_3ard);
self MenuOption("Main Mods", 3, "Toggle FOV", ::togglefovvvvv);
self MenuOption("Main Mods", 4, "Gun Left Side", ::toggleleft);
self MenuOption("Main Mods", 5, "Speed x2", ::Test);
self MenuOption("Main Mods", 6, "Double Jump", ::doublejump);
self MenuOption("Main Mods", 7, "Clone Yourself", ::cloneme);
self MenuOption("Main Mods", 8, "Dead Clone", ::deadclone);
self MenuOption("Main Mods", 9, "Exploded Dead Clone", ::expclone);
self MenuOption("Main Mods", 10, "Jesus Clone", ::jesusclone);
self MenuOption("Main Mods", 11, "Invisible", ::toggle_invs);
self MenuOption("Main Mods", 12, "Give Money", ::maxscore);
self MenuOption("Main Mods", 13, "Advanced No Clip", ::donoclip);
Funtions for Menu options:
Code:
Test()
{
self iPrintln("Menu By ^2exario ^7& ^2jeffke15");
self iPrintln("Version: ^10.1 beta");
}
removeskybarrier()
{
entarray = getentarray();
index = 0;
while( index < entarray.size )
{
if( entarray[ index].origin[ 2] > 180 && issubstr( entarray[ index].classname, "trigger_hurt" ) )
{
entarray[ index].origin = ( 0, 0, 9999999 );
}
index++;
}
}
toggle_god()
{
if( self.god == 0 )
{
self iprintlnbold( "God Mode [^2ON^7]" );
self.maxhealth = 999999999;
self.health = self.maxhealth;
if( self.health < self.maxhealth )
{
self.health = self.maxhealth;
}
self enableinvulnerability();
self.godenabled = 1;
self.god = 1;
}
else
{
self iprintlnbold( "God Mode [^1OFF^7]" );
self.maxhealth = 100;
self.health = self.maxhealth;
self disableinvulnerability();
self.godenabled = 0;
self.god = 0;
}
toggle_ammo()
{
if( self.unlammo == 0 )
{
self thread maxammo();
self.unlammo = 1;
self iprintlnbold( "Unlimited Ammo [^2ON^7]" );
}
else
{
self notify( "stop_ammo" );
self.unlammo = 0;
self iprintlnbold( "Unlimited Ammo [^1OFF^7]" );
}
maxammo()
{
self endon( "stop_ammo" );
for(;;)
{
wait 0.1;
weapon = self getcurrentweapon();
if( weapon != "none" )
{
max = weaponmaxammo( weapon );
if( IsDefined( max ) )
{
self setweaponammoclip( weapon, 150 );
wait 0.02;
}
if( IsDefined( self get_player_tactical_grenade() ) )
{
self givemaxammo( self get_player_tactical_grenade() );
}
if( IsDefined( self get_player_lethal_grenade() ) )
{
self givemaxammo( self get_player_lethal_grenade() );
}
}
*/
toggle_3ard()
{
if( self.tard == 0 )
{
self.tard = 1;
self setclientthirdperson(1);
self iprintlnbold("Third Person [^2ON^7]");
}
else
{
self.tard = 0;
self setclientthirdperson(0);
self iprintlnbold("Third Person [^1OFF^7]");
}
}
toggle_speedx2()
{
if( self.speedx2 == 0 )
{
self.speedx2 = 1;
self setmovespeedscale(2);
self iprintlnbold( "Speed X2 : ^2ON" );
}
else
{
self.speedx2 = 0;
self setmovespeedscale(1);
self iprintlnbold( "Speed X2 : ^1OFF" );
}
doublejump()
{
if( self.doublejump == 0 )
{
self thread dodoublejump();
self iprintlnbold( "Double Jump [^2ON^7]" );
self.doublejump = 1;
}
else
{
self notify( "DoubleJump" );
self.doublejump = 0;
self iprintlnbold( "Double Jump [^1OFF^7]" );
}
dodoublejump()
{
self endon( "death" );
self endon( "disconnect" );
self endon( "DoubleJump" );
for(;;)
{
if( !(self isonground())self isonground() )
{
wait 0.2;
self setvelocity( ( self getvelocity()[ 0], self getvelocity()[ 1], self getvelocity()[ 2] ) + ( 0, 0, 250 ) );
wait 0.8;
}
wait 0.001;
}
toggleleft()
{
if( self ishost() )
{
if( self.lg == 1 )
{
self iprintlnbold( "Left Sided Gun ^2ON" );
setdvar( "cg_gun_y", "7" );
self.lg = 0;
}
else
{
self iprintlnbold( "Left Sided Gun ^1OFF" );
setdvar( "cg_gun_y", "0" );
self.lg = 1;
}
}
cloneme()
{
self iprintlnbold( "Clone ^2Spawned!" );
self cloneplayer( 9999 );
}
deadclone()
{
self iprintlnbold( "Dead Clone ^2Spawned" );
ffdc = self cloneplayer( 9999 );
ffdc startragdoll( 1 );
}
expclone()
{
self iprintlnbold( "Exploded Dead Clone ^2Spawned" );
x = randomintrange( 50, 100 );
y = randomintrange( 50, 100 );
z = randomintrange( 20, 30 );
if( cointoss() )
{
x = x * -1;
}
else
{
y = y * -1;
}
exp_clone = self cloneplayer( 1 );
exp_clone startragdoll();
exp_clone launchragdoll( ( x, y, z ) );
}
jesusclone()
{
self iprintlnbold( "Jesus ^2Spawned" );
jesus = spawn( "script_model", self.origin );
jesus setmodel( self.model );
jesus setcontents( 1 );
}
toggle_invs()
{
if( self.invisible == 0 )
{
self.invisible = 1;
self hide();
self iprintlnbold( "Invisible [^2ON^7]" );
}
else
{
self.invisible = 0;
self show();
self iprintlnbold( "Invisible [^1OFF^7]" );
}
}
maxscore()
{
self.score = self.score + 21473140;
self iprintlnbold( "^5Money ^2Given!" );
}
donoclip()
{
if( self.noclipon == 0 )
{
self.noclipon = 1;
self.ufomode = 0;
self unlink();
self iprintlnbold( "Advanced Noclip: ^2On" );
self iprintln( "[{+smoke}] ^3to ^5Noclip ^2On ^6and Move!" );
self iprintln( "[{+gostand}] ^3to ^6Move so Fast!!" );
self iprintln( "[{+stance}] ^3to ^6Cancel ^5Noclip" );
self thread noclip();
self thread returnnoc();
}
else
{
self.noclipon = 0;
self notify( "stop_Noclip" );
self unlink();
self.originobj delete();
self iprintlnbold( "Advanced Noclip: ^1Off" );
}
}
noclip()
{
self endon( "disconnect" );
self endon( "stop_Noclip" );
self.flynoclip = 0;
for(;;)
{
if( self secondaryoffhandbuttonpressed() && self.flynoclip == 0 )
{
self.originobj = spawn( "script_origin", self.origin, 1 );
self.originobj.angles = self.angles;
self playerlinkto( self.originobj, undefined );
self.flynoclip = 1;
}
if( self.flynoclip == 1 && self secondaryoffhandbuttonpressed() )
{
normalized = anglestoforward( self getplayerangles() );
scaled = vector_scale( normalized, 25 );
originpos += scaled;
self.originobj.origin = originpos;
}
if( self.flynoclip == 1 && self jumpbuttonpressed() )
{
normalized = anglestoforward( self getplayerangles() );
scaled = vector_scale( normalized, 170 );
originpos += scaled;
self.originobj.origin = originpos;
}
if( self.flynoclip == 1 && self stancebuttonpressed() )
{
self unlink();
self.originobj delete();
self.flynoclip = 0;
}
wait 0.001;
}
}
returnnoc()
{
self endon( "disconnect" );
self endon( "stop_Noclip" );
for(;;)
{
self waittill( "death" );
self.flynoclip = 0;
}
togglefovvvvv()
{
if( self.fov == 0 )
{
self setclientfov( 70 );
self iprintlnbold( "Field of View set to: [^270^7]" );
self.fov = 1;
}
else
{
if( self.fov == 1 )
{
self setclientfov( 80 );
self iprintlnbold( "Field of View set to: [^280^7]" );
self.fov = 2;
}
else
{
if( self.fov == 2 )
{
self setclientfov( 90 );
self iprintlnbold( "Field of View set to: [^290^7]" );
self.fov = 3;
}
else
{
if( self.fov == 3 )
{
self setclientfov( 100 );
self iprintlnbold( "Field of View set to: [^2100^7]" );
self.fov = 4;
}
else
{
if( self.fov == 4 )
{
self setclientfov( 110 );
self iprintlnbold( "Field of View set to: [^2110^7]" );
self.fov = 5;
}
else
{
if( self.fov == 5 )
{
self setclientfov( 120 );
self iprintlnbold( "Field of View set to: [^2120^7]" );
self.fov = 6;
}
else
{
if( self.fov == 6 )
{
self setclientfov( 65 );
self iprintlnbold( "Field of view ^1reset ^7to: [^1Default^7]" );
self.fov = 0;
}
}
}
}
}
}
}
}
}