Post: [RELEASE] Some Functions For a Mod Menu
04-14-2015, 06:42 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I have been working on a Mod Menu for Black Ops 2 Zombies (GreZz 4.1) and thought I would share some of my functions that I use. A few code have just had some minor changes and some are one that I played around with and got working. I also have other codes that work for the maps that they are intended for but they cause script errors when I try to load other maps. Alot of the code that I have gotten to work are mostly just Dev Debug codes changed around to work for my needs. Most of these are just the Functions you will need to call them from the Menu options to make the work (Except the Mules Kick - it needs to be called from onplayerconnect and the player to many weapons montior also needs to be there.)



All functions in Spoiler:




This can be used on transit to open the door and Activate the Power to the Pack a Punch on Transit. ( It can also be made Togglable, but the is just an add in that I used in the Open All Door Script the way it is now).

    

powerp()
{
self endon("disconnect");
level notify( "electric_door" );
clientnotify( "power_on" );
flag_set( "power_on" );
level setclientfield( "zombie_power_on", 1 );
level thread maps/mp/zombies/_zm_perks::perk_unpause_all_perks();
if(GetDvar("mapname") == "zm_transit") //Transit
{
self thread maps/mp/zombies/_zm_game_module::turn_power_on_and_open_doors();
wait 0.25;
self iPrintln("^7PAP Power ^2ON");
}
wait 0.25;
self iPrintln("^7Power ^2ON");
}

[B][U][COLOR="#EE82EE"]This Is How I have it used in my Script.[/COLOR][/U][/B]

[spoiler][code]

OpenAllTehDoors()
{
setdvar("zombie_unlock_all",1);
level notify( "junk purchased" );
level notify( "open_sesame" );
self give_money();
self Pppppower();
wait 0.5;
self iPrintln("Open all the doors ^2Success");
Triggers=StrTok("zombie_doors|zombie_door|zombie_airlock_buy|zombie_debris|electric_door|rock_debris_pile|flag_blocker|window_shutter|zombie_trap","|");
for(a=0;a<Triggers.size;a++)
{
Trigger=GetEntArray(Triggers[a],"targetname");
for(b=0;b<Trigger.size;b++)
{
Trigger[b] notify("trigger");
}
}
wait .1;
setdvar("zombie_unlock_all",0);
}


Pppppower()
{
if(GetDvar("mapname") == "zm_transit") //Transit
{
self powerp();
}
if(GetDvar("mapname") == "zm_highrise") //Die Rise
{
self powerp();
}
if(GetDvar("mapname") == "zm_prison") // Mob of the Dead
{
/*self powerp();*/
}
if(GetDvar("mapname") == "zm_buried") // Buried
{
self powerp();
}
if(GetDvar("mapname") == "zm_tomb") // Origins
{
self powerp();
}
}


powerp()
{
self endon("disconnect");
level notify( "electric_door" );
clientnotify( "power_on" );
flag_set( "power_on" );
level setclientfield( "zombie_power_on", 1 );
level thread maps/mp/zombies/_zm_perks::perk_unpause_all_perks();
if(GetDvar("mapname") == "zm_transit") //Transit
{
self thread maps/mp/zombies/_zm_game_module::turn_power_on_and_open_doors();
wait 0.25;
self iPrintln("^7PAP Power ^2ON");
}
wait 0.25;
self iPrintln("^7Power ^2ON");
}




[/code]




This one right here allows you to give yourself all the Perks on the Map at one time. (It only gives you the Perks that have machines on the map, not perma perks and on Origins you only get the main 4 that have machines. (Jug, Stamina, Revive and Speed Cola).) On a side note this is Treyarcs Code just made it work for my Menu.

    

player_all_perks()
{
self endon("death");
self endon("disconnect");
machines = getentarray( "zombie_vending", "targetname" );
perks = [];
i = 0;
while ( i < machines.size )
{
if ( machines[ i ].script_noteworthy == "specialty_weapupgrade" )
{
i++;
continue;
}
else
{
perks[ perks.size ] = machines[ i ].script_noteworthy;
}
i++;
}
_a539 = perks;
_k539 = getFirstArrayKey( _a539 );
while ( isDefined( _k539 ) )
{
perk = _a539[ _k539 ];
if ( isDefined( self.perk_purchased ) && self.perk_purchased == perk )
{
}
else
{
if ( self hasperk( perk ) || self maps/mp/zombies/_zm_perks::has_perk_paused( perk ) )
{
break;
}
else
{
self maps/mp/zombies/_zm_perks::give_perk( perk, 0 );
wait 0.25;
}
}
_k539 = getNextArrayKey( _a539, _k539 );
}
self._retain_perks = 1;
self iprintln("All Perks ^2Given");
wait .05;
self FermetureMenu(); //This Makes The Menu Close After Thread is Run
wait .25;
}




And This is the one I use for all Perk on Origins:

    

doOriginPreks()
{
self endon("death");
self endon("disconnect");
self doPerks("specialty_armorvest"); // Juggernaut
wait .05;
self doPerks("specialty_fastreload"); //Speed Cola
wait .05;
self doPerks("specialty_rof"); // Double Tap
wait .05;
self doPerks("specialty_grenadepulldeath"); // Electric Cherry
wait .05;
self doPerks("specialty_flakjacket"); // PHD Flopper
wait .05;
self doPerks("specialty_additionalprimaryweapon"); // Mule Kick
wait .05;
self doPerks("specialty_deadshot"); // Deadshot
wait .05;
self doPerks("specialty_longersprint"); //Staminia Up
wait .05;
self doPerks("specialty_quickrevive"); // Quick Revive
wait .05;
self FermetureMenu(); //This Makes The Menu Close After Thread is Run
wait .25;
}





This allow you to have more that 3 guns on maps that have Mule Kick (it is currently set to 8 max) I've tried different amount and anything higher runs into issues.

    
onplayerconnect():
if(isDefined(level.player_too_many_weapons_monitor))
level.player_too_many_weapons_monitor = false;
player thread MuleForAll();

    
MuleForAll()
{
self endon("disconnect");
if ( isDefined( level.zombiemode_using_additionalprimaryweapon_perk ) && level.zombiemode_using_additionalprimaryweapon_perk )
{
level thread mule_kick_4_weapons();
}
}
mule_kick_4_weapons()
{
_a1697 = get_players();
_k1697 = getFirstArrayKey( _a1697 );
while ( isDefined( _k1697 ) )
{
player = _a1697[ _k1697 ];
if ( !isDefined( player._retain_perks_array ) )
{
player._retain_perks_array = [];
}
if ( !player hasperk( "specialty_additionalprimaryweapon" ) )
{
player maps/mp/zombies/_zm_perks::give_perk( "specialty_additionalprimaryweapon", 0 );
}
player._retain_perks_array[ "specialty_additionalprimaryweapon" ] = 1;
_k1697 = getNextArrayKey( _a1697, _k1697 );
}
level.additionalprimaryweapon_limit = 8;
}


Function gives the Gun Camo for the map you are on (ie: if Origins the guns will be the blue crystal looking guns)

    

doWeapon3(i)
{
self endon("disconnect");
self maps/mp/zombies/_zm_weapons::weapon_give(i);
}


Now I know this isn't my code but I updated it so when on Tranit (the Jetgun ) and Buried (Paralyzer) doesn't overheat (unless you turn off the Unlimited ammo). It also make all Lethal, Tactical, and Claymores Unlimited.

    

Toggle_Ammo()
{
self endon("disconnect");
if(self.unlammo==false)
{
self thread MaxAmmo();
self.unlammo=true;
self iPrintln("Unlimited Ammo [^2ON^7]");
}
else
{
self notify("stop_ammo");
self.unlammo=false;
self iPrintln("Unlimited Ammo [^1OFF^7]");
}
}
MaxAmmo()
{
self endon("stop_ammo");
for(;Winky Winky
{
wait 0.1;
weapon = self getcurrentweapon();
if ( weapon != "none" )
{
self setweaponoverheating( 0, 0 );
max = weaponmaxammo( weapon );
if ( isDefined( max ) )
{
self setweaponammostock( weapon, max );
}
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() );
}
}
}
}



This is my Round Menu. It has Goto Round 250, 100, then you can go up or down round by 1, 10, or 50 Rounds.

    

max_round()
{
self thread zombiekill();
level.round_number = 250;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 2;
}
round_up_100()
{
self thread ZombieKill();
level.round_number = 99;
self iPrintln("Round Set To ^1"+level.round_number+"");
wait 2;
}
round_up_50()
{
self thread zombiekill();
level.round_number = level.round_number + 49;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_up_10()
{
self thread zombiekill();
level.round_number = level.round_number + 9;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_up()
{
self thread zombiekill();
level.round_number = level.round_number + 1;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_down()
{
self thread zombiekill();
level.round_number = level.round_number - 1;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_down_10()
{
self thread zombiekill();
level.round_number = level.round_number - 9;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_down_50()
{
self thread zombiekill();
level.round_number = level.round_number - 49;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_down_1()
{
self thread zombiekill();
level.round_number = 0;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 2;
}




This is just where you can turn on or off wheither the Mystery box can move..

    
MysteryBoxNoNo()
{
self endon("disconnect");
if( getDvar( "magic_chest_movable" ) == "1" )
{
setdvar( "magic_chest_movable", "0" );
self iPrintln("Mystery Box ^2Can't Move");
}
else if( getDvar( "magic_chest_movable" ) == "0" )
{
setdvar( "magic_chest_movable", "1" );
self iPrintln("Mystery Box ^2Can Move");
}
}



You can use this to give yourself sticky grenades or switch back to frags and I beileve you takeaway the ones you have. (And only on Maps that stickies are included already. I think).

    

dolethal(i)
{
self endon("death");
self endon("disconnect");
self giveweapon(i);
self takeweapon( self get_player_lethal_grenade() );
self set_player_lethal_grenade(i);
}




Just to give Working Emp Grenades on Transit

    

doemps()
{
self endon("death");
self endon("disconnect");
self giveweapon( "emp_grenade_zm" );
self takeweapon( self get_player_tactical_grenade() );
self set_player_tactical_grenade( "emp_grenade_zm" );

self iPrintln("^7Emps ^2Given");
}




This is to give Working Monkey Bombs that function as the should. (Got tired of menus with Dud Monkeys).

    

domonkey()
{
self endon("death");
self endon("disconnect");
self giveweapon( "cymbal_monkey_zm" );
self takeweapon( self get_player_tactical_grenade() );
self set_player_tactical_grenade( "cymbal_monkey_zm" );
self thread monkey_monkey();
}
monkey_monkey()
{
if ( maps/mp/zombies/_zm_weap_cymbal_monkey::cymbal_monkey_exists() )
{
if ( loadout.zombie_cymbal_monkey_count )
{
self maps/mp/zombies/_zm_weap_cymbal_monkey::player_give_cymbal_monkey();
self setweaponammoclip( "cymbal_monkey_zm", loadout.zombie_cymbal_monkey_count );
}
self iPrintln("^7Monkeys ^2Given");
}
}




This allows you to give the Bowie Knife or Galvaknucles (only on Maps that they are already on).

    

doMeleeBG(i)
{
self endon("death");
self endon("disconnect");
self takeweapon( self get_player_melee_weapon() );
self giveweapon(i);
self switchtoweapon( self getcurrentweapon() );
self set_player_melee_weapon(i);
}




This is to give working claymores.

    

doclaymore()
{
self endon("death");
self endon("disconnect");
self giveweapon( "claymore_zm" );
self set_player_placeable_mine( "claymore_zm" );
self setactionslot( 4, "weapon", "claymore_zm" );
self setweaponammostock( "claymore_zm", 2 );
self thread maps/mp/zombies/_zm_weap_claymore::claymore_setup();

self iprintln("Claymores ^2Given");
}




This is for Buried Map. It allows you to give yourself Timebombs that work.

    

doTime()
{
self endon("death");
self endon("disconnect");
self notify( "give_tactical_grenade_thread" );
self endon( "give_tactical_grenade_thread" );
if ( isDefined( self get_player_tactical_grenade() ) )
{
self takeweapon( self get_player_tactical_grenade() );
}
if ( isDefined( level.zombiemode_time_bomb_give_func ) )
{
self [[ level.zombiemode_time_bomb_give_func ]]();
}
self iPrintln("^7Time Bombs ^2Given");
}




This is the Function for giving equipment.. (Turbine, Trample Steam, HeadChopper, Subsurface Resonator, Zombie Shield, Ect) and Also use for the Jetgun on Transit.

    

doequipment_give(i)
{
self endon("death");
self endon("disconnect");
self maps/mp/zombies/_zm_equipment::equipment_buy(i);
}




This is for Mob of the Dead Tommahawks ( I believe the fuction properly Need more testing).

    

Tomma(i)
{
self endon("death");
self endon("disconnect");
self giveweapon(i);
self takeweapon( self get_player_tactical_grenade() );
self set_player_tactical_grenade(i);
}





These Are For Origins:

When activated all you have to do if Dig a spot and it will give you the Gold Shovel (Note you have to pick up a Regular Shovel First). This I got from a Users Post over at NGU. (Bigmoneyhustlin)

    

dogoldshovel()
{
self endon("disconnect");
self.dig_vars[ "n_spots_dug" ]+=225;

self iPrintln("^2NOW FIND A ^1DIG SPOT");
}



When activated Will instantly give all players the Golden Helmet. (Haven't got it to work for individual players yet)

    

dogoldhelmet()
{
self endon("disconnect");
setdvar( "give_helmet", "on" );
_a1153 = getplayers();
_k1153 = getFirstArrayKey( _a1153 );
while ( isDefined( _k1153 ) )
{
player = _a1153[ _k1153 ];
player.dig_vars[ "has_helmet" ] = 1;
n_player = player getentitynumber() + 1;
level setclientfield( "helmet_player" + n_player, 1 );
_k1153 = getNextArrayKey( _a1153, _k1153 );
}
self iPrintln("^2Golden Helmet ^1Given");
}




This will give you Air Strike Nades that function.

    

dobeacon()
{
self endon("death");
self endon("disconnect");
self maps/mp/zombies/_zm_weapons::weapon_give( "beacon_zm" );

self iPrintln("^7Air Strike ^2Given");
}




This One works fine on Origins, But with it in the Menu other Maps won't load and it gives Script error message.
It lets you give Working Upgraded Staffs....


    

doWeapon4(i)
{
self endon("death");
self endon("disconnect");
self GiveWeapon(i);
self SwitchToWeapon(i);
self GiveMaxAmmo(i);
if(GetDvar("mapname") == "zm_tomb") // Origins
{
self thread maps/mp/zm_tomb_utility::update_staff_accessories();
}
self iPrintln("Weapon "+self.Menu.System["MenuTexte"][self.Menu.System["MenuRoot"]][self.Menu.System["MenuCurser"]]+" ^2Given");
}



This one allows you to give yourself Zombie Blood (but again gives Script Error when trying to load on other maps)

    

zbgrab()
{
self endon("death");
self endon("disconnect");

self maps/mp/zombies/_zm_powerup_zombie_blood::zombie_blood_powerup( "zombie_blood", self );
self.zombie_vars[ "zombie_powerup_zombie_blood_time" ] = 180;
}



This allows you to give yourself the Iron Fist (One Inch Punch) (Again gives Script Errors on Other Maps). (Works fine on Origins)

    

Fillboxes(i)
{
self endon("death");
self endon("disconnect");
str_weapon = self getcurrentweapon();
self disable_player_move_states( 1 );
self giveweapon( "zombie_one_inch_punch_flourish" );
self switchtoweapon( "zombie_one_inch_punch_flourish" );
self waittill_any( "player_downed", "weapon_change_complete" );
self switchtoweapon( str_weapon );
self enable_player_move_states();
self takeweapon( "zombie_one_inch_punch_flourish" );
self giveweapon(i);
self set_player_melee_weapon(i);
maps/mp/zombies/_zm_weap_one_inch_punch::monitor_melee_swipe();
self iPrintln("^7Iron Fist ^2Given");
}




This one Opens all the Tunnel Portals to the Crazy Place (Just to get in - Not Out) and stops the walls from coming down. (Again gives Script Errors on Other Maps)

    

StargateSG1()
{
self endon("disconnect");
self iPrintln("^7Stargates ^2Activated");
flag_set( "activate_zone_chamber" );
flag_set( "player_active_in_chamber" );
maps/mp/zm_tomb_teleporter::stargate_teleport_enable( 1 );
maps/mp/zm_tomb_teleporter::stargate_teleport_enable( 2 );
maps/mp/zm_tomb_teleporter::stargate_teleport_enable( 3 );
maps/mp/zm_tomb_teleporter::stargate_teleport_enable( 4 );
setdvar( "open_all_teleporters", "on" );
level notify( "stop_random_chamber_walls" );
level notify( "activate_zone_chamber" );
level notify( "open_all_gramophone_doors" );
maps/mp/zm_tomb_chamber::move_wall_up();
}



[/spoiler]
Last edited by blakryder1 ; 04-14-2015 at 10:34 PM.

The following 9 users say thank you to blakryder1 for this useful post:

BullyWiiPlaza, Devilemi, Im_YouViolateMe, itsSorrow, KillerGamer81, ModyHacker, Rezqaazify, xDebugKiller, xTiibo Modz
04-14-2015, 07:16 PM #2
This is in the wrong section
04-14-2015, 07:28 PM #3
Thank you Black Panther for moving to proper section.
Last edited by blakryder1 ; 04-15-2015 at 12:39 AM.
04-14-2015, 10:02 PM #4
ModyHacker
Gym leader
damn! Enzo

havent seen these anymore!

Nice one man!
04-14-2015, 10:08 PM #5
Me either, and I search alot of Forums. Thats why I released them and also hoping that some of the pros out there can help me clean them up alittle and make them better. I will be adding to as I get things moving along.
04-15-2015, 12:29 AM #6
SyGnUs
Give a F*** About Your Lifestyle
Originally posted by blakryder1 View Post
Me either, and I search alot of Forums. Thats why I released them and also hoping that some of the pros out there can help me clean them up alittle and make them better. I will be adding to as I get things moving along.


Been a while since I messed with zombies but here is a function to Pack a Punch your current weapon -

    
Put this in init() -

PrecacheItem("zombie_knuckle_crack");

And just call this function -

pack_current_weapon()
{
weap = maps\mp\zombies\_zm_weapons::get_base_name( self getcurrentweapon() );
weapon = get_upgraded( weap );
papGun = "zombie_knuckle_crack";
if(isDefined(weapon))
{
self TakeWeapon( weap );
self GiveWeapon( papGun );
self SwitchToWeapon( papGun );
wait 2;
self TakeWeapon( papGun );
self GiveWeapon( weapon, 0, self maps\mp\zombies\_zm_weapons::get_pack_a_punch_weapon_options( weapon ) );
self GiveStartAmmo( weapon );
self SwitchToWeapon( weapon );
}
}

get_upgraded( weaponname )
{
if( IsDefined(level.zombie_weapons[weaponname]) && IsDefined(level.zombie_weapons[weaponname].upgrade_name) )
{
return maps\mp\zombies\_zm_weapons::get_upgrade_weapon( weaponname, false );
}
else
{
return maps\mp\zombies\_zm_weapons::get_upgrade_weapon( weaponname, true );
}
}
Last edited by SyGnUs ; 04-15-2015 at 12:33 AM.

The following user thanked SyGnUs for this useful post:

blakryder1
04-15-2015, 12:37 AM #7
I was trying to mess with that function like a week ago an it just annoyed me because I couldn't get it to work. (also I think my problem was that I was trying to make it where you could unpack a weapon)

Thanks for the code I'll try it out in my menu
04-15-2015, 12:53 AM #8
Im_YouViolateMe
NextGenUpdate Elite
Originally posted by blakryder1 View Post
I have been working on a Mod Menu for Black Ops 2 Zombies (GreZz 4.1) and thought I would share some of my functions that I use. A few code have just had some minor changes and some are one that I played around with and got working. I also have other codes that work for the maps that they are intended for but they cause script errors when I try to load other maps. Alot of the code that I have gotten to work are mostly just Dev Debug codes changed around to work for my needs. Most of these are just the Functions you will need to call them from the Menu options to make the work (Except the Mules Kick - it needs to be called from onplayerconnect and the player to many weapons montior also needs to be there.)



All functions in Spoiler:




This can be used on transit to open the door and Activate the Power to the Pack a Punch on Transit. ( It can also be made Togglable, but the is just an add in that I used in the Open All Door Script the way it is now).

    

powerp()
{
self endon("disconnect");
level notify( "electric_door" );
clientnotify( "power_on" );
flag_set( "power_on" );
level setclientfield( "zombie_power_on", 1 );
level thread maps/mp/zombies/_zm_perks::perk_unpause_all_perks();
if(GetDvar("mapname") == "zm_transit") //Transit
{
self thread maps/mp/zombies/_zm_game_module::turn_power_on_and_open_doors();
wait 0.25;
self iPrintln("^7PAP Power ^2ON");
}
wait 0.25;
self iPrintln("^7Power ^2ON");
}

[B][U][COLOR="#EE82EE"]This Is How I have it used in my Script.[/COLOR][/U][/B]

[spoiler][code]

OpenAllTehDoors()
{
setdvar("zombie_unlock_all",1);
level notify( "junk purchased" );
level notify( "open_sesame" );
self give_money();
self Pppppower();
wait 0.5;
self iPrintln("Open all the doors ^2Success");
Triggers=StrTok("zombie_doors|zombie_door|zombie_airlock_buy|zombie_debris|electric_door|rock_debris_pile|flag_blocker|window_shutter|zombie_trap","|");
for(a=0;a<Triggers.size;a++)
{
Trigger=GetEntArray(Triggers[a],"targetname");
for(b=0;b<Trigger.size;b++)
{
Trigger[b] notify("trigger");
}
}
wait .1;
setdvar("zombie_unlock_all",0);
}


Pppppower()
{
if(GetDvar("mapname") == "zm_transit") //Transit
{
self powerp();
}
if(GetDvar("mapname") == "zm_highrise") //Die Rise
{
self powerp();
}
if(GetDvar("mapname") == "zm_prison") // Mob of the Dead
{
/*self powerp();*/
}
if(GetDvar("mapname") == "zm_buried") // Buried
{
self powerp();
}
if(GetDvar("mapname") == "zm_tomb") // Origins
{
self powerp();
}
}


powerp()
{
self endon("disconnect");
level notify( "electric_door" );
clientnotify( "power_on" );
flag_set( "power_on" );
level setclientfield( "zombie_power_on", 1 );
level thread maps/mp/zombies/_zm_perks::perk_unpause_all_perks();
if(GetDvar("mapname") == "zm_transit") //Transit
{
self thread maps/mp/zombies/_zm_game_module::turn_power_on_and_open_doors();
wait 0.25;
self iPrintln("^7PAP Power ^2ON");
}
wait 0.25;
self iPrintln("^7Power ^2ON");
}




[/code]




This one right here allows you to give yourself all the Perks on the Map at one time. (It only gives you the Perks that have machines on the map, not perma perks and on Origins you only get the main 4 that have machines. (Jug, Stamina, Revive and Speed Cola).) On a side note this is Treyarcs Code just made it work for my Menu.

    

player_all_perks()
{
self endon("death");
self endon("disconnect");
machines = getentarray( "zombie_vending", "targetname" );
perks = [];
i = 0;
while ( i < machines.size )
{
if ( machines[ i ].script_noteworthy == "specialty_weapupgrade" )
{
i++;
continue;
}
else
{
perks[ perks.size ] = machines[ i ].script_noteworthy;
}
i++;
}
_a539 = perks;
_k539 = getFirstArrayKey( _a539 );
while ( isDefined( _k539 ) )
{
perk = _a539[ _k539 ];
if ( isDefined( self.perk_purchased ) && self.perk_purchased == perk )
{
}
else
{
if ( self hasperk( perk ) || self maps/mp/zombies/_zm_perks::has_perk_paused( perk ) )
{
break;
}
else
{
self maps/mp/zombies/_zm_perks::give_perk( perk, 0 );
wait 0.25;
}
}
_k539 = getNextArrayKey( _a539, _k539 );
}
self._retain_perks = 1;
self iprintln("All Perks ^2Given");
wait .05;
self FermetureMenu(); //This Makes The Menu Close After Thread is Run
wait .25;
}




And This is the one I use for all Perk on Origins:

    

doOriginPreks()
{
self endon("death");
self endon("disconnect");
self doPerks("specialty_armorvest"); // Juggernaut
wait .05;
self doPerks("specialty_fastreload"); //Speed Cola
wait .05;
self doPerks("specialty_rof"); // Double Tap
wait .05;
self doPerks("specialty_grenadepulldeath"); // Electric Cherry
wait .05;
self doPerks("specialty_flakjacket"); // PHD Flopper
wait .05;
self doPerks("specialty_additionalprimaryweapon"); // Mule Kick
wait .05;
self doPerks("specialty_deadshot"); // Deadshot
wait .05;
self doPerks("specialty_longersprint"); //Staminia Up
wait .05;
self doPerks("specialty_quickrevive"); // Quick Revive
wait .05;
self FermetureMenu(); //This Makes The Menu Close After Thread is Run
wait .25;
}





This allow you to have more that 3 guns on maps that have Mule Kick (it is currently set to 8 max) I've tried different amount and anything higher runs into issues.

    
onplayerconnect():
if(isDefined(level.player_too_many_weapons_monitor))
level.player_too_many_weapons_monitor = false;
player thread MuleForAll();

    
MuleForAll()
{
self endon("disconnect");
if ( isDefined( level.zombiemode_using_additionalprimaryweapon_perk ) && level.zombiemode_using_additionalprimaryweapon_perk )
{
level thread mule_kick_4_weapons();
}
}
mule_kick_4_weapons()
{
_a1697 = get_players();
_k1697 = getFirstArrayKey( _a1697 );
while ( isDefined( _k1697 ) )
{
player = _a1697[ _k1697 ];
if ( !isDefined( player._retain_perks_array ) )
{
player._retain_perks_array = [];
}
if ( !player hasperk( "specialty_additionalprimaryweapon" ) )
{
player maps/mp/zombies/_zm_perks::give_perk( "specialty_additionalprimaryweapon", 0 );
}
player._retain_perks_array[ "specialty_additionalprimaryweapon" ] = 1;
_k1697 = getNextArrayKey( _a1697, _k1697 );
}
level.additionalprimaryweapon_limit = 8;
}


Function gives the Gun Camo for the map you are on (ie: if Origins the guns will be the blue crystal looking guns)

    

doWeapon3(i)
{
self endon("disconnect");
self maps/mp/zombies/_zm_weapons::weapon_give(i);
}


Now I know this isn't my code but I updated it so when on Tranit (the Jetgun ) and Buried (Paralyzer) doesn't overheat (unless you turn off the Unlimited ammo). It also make all Lethal, Tactical, and Claymores Unlimited.

    

Toggle_Ammo()
{
self endon("disconnect");
if(self.unlammo==false)
{
self thread MaxAmmo();
self.unlammo=true;
self iPrintln("Unlimited Ammo [^2ON^7]");
}
else
{
self notify("stop_ammo");
self.unlammo=false;
self iPrintln("Unlimited Ammo [^1OFF^7]");
}
}
MaxAmmo()
{
self endon("stop_ammo");
for(;Winky Winky
{
wait 0.1;
weapon = self getcurrentweapon();
if ( weapon != "none" )
{
self setweaponoverheating( 0, 0 );
max = weaponmaxammo( weapon );
if ( isDefined( max ) )
{
self setweaponammostock( weapon, max );
}
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() );
}
}
}
}



This is my Round Menu. It has Goto Round 250, 100, then you can go up or down round by 1, 10, or 50 Rounds.

    

max_round()
{
self thread zombiekill();
level.round_number = 250;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 2;
}
round_up_100()
{
self thread ZombieKill();
level.round_number = 99;
self iPrintln("Round Set To ^1"+level.round_number+"");
wait 2;
}
round_up_50()
{
self thread zombiekill();
level.round_number = level.round_number + 49;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_up_10()
{
self thread zombiekill();
level.round_number = level.round_number + 9;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_up()
{
self thread zombiekill();
level.round_number = level.round_number + 1;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_down()
{
self thread zombiekill();
level.round_number = level.round_number - 1;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_down_10()
{
self thread zombiekill();
level.round_number = level.round_number - 9;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_down_50()
{
self thread zombiekill();
level.round_number = level.round_number - 49;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 0.5;
}
round_down_1()
{
self thread zombiekill();
level.round_number = 0;
self iprintln("Round Set To ^1" + level.round_number + "");
wait 2;
}




This is just where you can turn on or off wheither the Mystery box can move..

    
MysteryBoxNoNo()
{
self endon("disconnect");
if( getDvar( "magic_chest_movable" ) == "1" )
{
setdvar( "magic_chest_movable", "0" );
self iPrintln("Mystery Box ^2Can't Move");
}
else if( getDvar( "magic_chest_movable" ) == "0" )
{
setdvar( "magic_chest_movable", "1" );
self iPrintln("Mystery Box ^2Can Move");
}
}



You can use this to give yourself sticky grenades or switch back to frags and I beileve you takeaway the ones you have. (And only on Maps that stickies are included already. I think).

    

dolethal(i)
{
self endon("death");
self endon("disconnect");
self giveweapon(i);
self takeweapon( self get_player_lethal_grenade() );
self set_player_lethal_grenade(i);
}




Just to give Working Emp Grenades on Transit

    

doemps()
{
self endon("death");
self endon("disconnect");
self giveweapon( "emp_grenade_zm" );
self takeweapon( self get_player_tactical_grenade() );
self set_player_tactical_grenade( "emp_grenade_zm" );

self iPrintln("^7Emps ^2Given");
}




This is to give Working Monkey Bombs that function as the should. (Got tired of menus with Dud Monkeys).

    

domonkey()
{
self endon("death");
self endon("disconnect");
self giveweapon( "cymbal_monkey_zm" );
self takeweapon( self get_player_tactical_grenade() );
self set_player_tactical_grenade( "cymbal_monkey_zm" );
self thread monkey_monkey();
}
monkey_monkey()
{
if ( maps/mp/zombies/_zm_weap_cymbal_monkey::cymbal_monkey_exists() )
{
if ( loadout.zombie_cymbal_monkey_count )
{
self maps/mp/zombies/_zm_weap_cymbal_monkey::player_give_cymbal_monkey();
self setweaponammoclip( "cymbal_monkey_zm", loadout.zombie_cymbal_monkey_count );
}
self iPrintln("^7Monkeys ^2Given");
}
}




This allows you to give the Bowie Knife or Galvaknucles (only on Maps that they are already on).

    

doMeleeBG(i)
{
self endon("death");
self endon("disconnect");
self takeweapon( self get_player_melee_weapon() );
self giveweapon(i);
self switchtoweapon( self getcurrentweapon() );
self set_player_melee_weapon(i);
}




This is to give working claymores.

    

doclaymore()
{
self endon("death");
self endon("disconnect");
self giveweapon( "claymore_zm" );
self set_player_placeable_mine( "claymore_zm" );
self setactionslot( 4, "weapon", "claymore_zm" );
self setweaponammostock( "claymore_zm", 2 );
self thread maps/mp/zombies/_zm_weap_claymore::claymore_setup();

self iprintln("Claymores ^2Given");
}




This is for Buried Map. It allows you to give yourself Timebombs that work.

    

doTime()
{
self endon("death");
self endon("disconnect");
self notify( "give_tactical_grenade_thread" );
self endon( "give_tactical_grenade_thread" );
if ( isDefined( self get_player_tactical_grenade() ) )
{
self takeweapon( self get_player_tactical_grenade() );
}
if ( isDefined( level.zombiemode_time_bomb_give_func ) )
{
self [[ level.zombiemode_time_bomb_give_func ]]();
}
self iPrintln("^7Time Bombs ^2Given");
}




This is the Function for giving equipment.. (Turbine, Trample Steam, HeadChopper, Subsurface Resonator, Zombie Shield, Ect) and Also use for the Jetgun on Transit.

    

doequipment_give(i)
{
self endon("death");
self endon("disconnect");
self maps/mp/zombies/_zm_equipment::equipment_buy(i);
}




This is for Mob of the Dead Tommahawks ( I believe the fuction properly Need more testing).

    

Tomma(i)
{
self endon("death");
self endon("disconnect");
self giveweapon(i);
self takeweapon( self get_player_tactical_grenade() );
self set_player_tactical_grenade(i);
}





These Are For Origins:

When activated all you have to do if Dig a spot and it will give you the Gold Shovel (Note you have to pick up a Regular Shovel First). This I got from a Users Post over at NGU. (Bigmoneyhustlin)

    

dogoldshovel()
{
self endon("disconnect");
self.dig_vars[ "n_spots_dug" ]+=225;

self iPrintln("^2NOW FIND A ^1DIG SPOT");
}



When activated Will instantly give all players the Golden Helmet. (Haven't got it to work for individual players yet)

    

dogoldhelmet()
{
self endon("disconnect");
setdvar( "give_helmet", "on" );
_a1153 = getplayers();
_k1153 = getFirstArrayKey( _a1153 );
while ( isDefined( _k1153 ) )
{
player = _a1153[ _k1153 ];
player.dig_vars[ "has_helmet" ] = 1;
n_player = player getentitynumber() + 1;
level setclientfield( "helmet_player" + n_player, 1 );
_k1153 = getNextArrayKey( _a1153, _k1153 );
}
self iPrintln("^2Golden Helmet ^1Given");
}




This will give you Air Strike Nades that function.

    

dobeacon()
{
self endon("death");
self endon("disconnect");
self maps/mp/zombies/_zm_weapons::weapon_give( "beacon_zm" );

self iPrintln("^7Air Strike ^2Given");
}




This One works fine on Origins, But with it in the Menu other Maps won't load and it gives Script error message.
It lets you give Working Upgraded Staffs....


    

doWeapon4(i)
{
self endon("death");
self endon("disconnect");
self GiveWeapon(i);
self SwitchToWeapon(i);
self GiveMaxAmmo(i);
if(GetDvar("mapname") == "zm_tomb") // Origins
{
self thread maps/mp/zm_tomb_utility::update_staff_accessories();
}
self iPrintln("Weapon "+self.Menu.System["MenuTexte"][self.Menu.System["MenuRoot"]][self.Menu.System["MenuCurser"]]+" ^2Given");
}



This one allows you to give yourself Zombie Blood (but again gives Script Error when trying to load on other maps)

    

zbgrab()
{
self endon("death");
self endon("disconnect");

self maps/mp/zombies/_zm_powerup_zombie_blood::zombie_blood_powerup( "zombie_blood", self );
self.zombie_vars[ "zombie_powerup_zombie_blood_time" ] = 180;
}



This allows you to give yourself the Iron Fist (One Inch Punch) (Again gives Script Errors on Other Maps). (Works fine on Origins)

    

Fillboxes(i)
{
self endon("death");
self endon("disconnect");
str_weapon = self getcurrentweapon();
self disable_player_move_states( 1 );
self giveweapon( "zombie_one_inch_punch_flourish" );
self switchtoweapon( "zombie_one_inch_punch_flourish" );
self waittill_any( "player_downed", "weapon_change_complete" );
self switchtoweapon( str_weapon );
self enable_player_move_states();
self takeweapon( "zombie_one_inch_punch_flourish" );
self giveweapon(i);
self set_player_melee_weapon(i);
maps/mp/zombies/_zm_weap_one_inch_punch::monitor_melee_swipe();
self iPrintln("^7Iron Fist ^2Given");
}




This one Opens all the Tunnel Portals to the Crazy Place (Just to get in - Not Out) and stops the walls from coming down. (Again gives Script Errors on Other Maps)

    

StargateSG1()
{
self endon("disconnect");
self iPrintln("^7Stargates ^2Activated");
flag_set( "activate_zone_chamber" );
flag_set( "player_active_in_chamber" );
maps/mp/zm_tomb_teleporter::stargate_teleport_enable( 1 );
maps/mp/zm_tomb_teleporter::stargate_teleport_enable( 2 );
maps/mp/zm_tomb_teleporter::stargate_teleport_enable( 3 );
maps/mp/zm_tomb_teleporter::stargate_teleport_enable( 4 );
setdvar( "open_all_teleporters", "on" );
level notify( "stop_random_chamber_walls" );
level notify( "activate_zone_chamber" );
level notify( "open_all_gramophone_doors" );
maps/mp/zm_tomb_chamber::move_wall_up();
}



[/spoiler]


glad to see people working on other stuff rather than just multiplayer menus :y:
04-15-2015, 01:01 AM #9
Thank You, I am not really for the Multiplayer. I wish more people would release their functions. I've seen afew I would love to have, maybe I will figure them out one day. I am new to the GSC thing but I am learning something new everyday.
04-15-2015, 02:07 AM #10
SyGnUs
Give a F*** About Your Lifestyle
Originally posted by blakryder1 View Post
Thank You, I am not really for the Multiplayer. I wish more people would release their functions. I've seen afew I would love to have, maybe I will figure them out one day. I am new to the GSC thing but I am learning something new everyday.


What are functions that you want that aren't released?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo