Answered Black Ops 2 Zombie GSC give all perks function

n3m3sis28

Well-Known Member
Messages
114
Reaction score
29
Points
213
hi can someone pls give me yhe script for the perks i mean a script what will change the perks in your menu on what you are playing tnx
 

SCP

Moderator
Staff member
Donator
Messages
411
Reaction score
408
Points
848
hi can someone pls give me yhe script for the perks i mean a script what will change the perks in your menu on what you are playing tnx
Are you talking about a script which gives you all zombie perks dynamically for each map? :smile:
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,998
Reaction score
2,918
Points
1,053
hi can someone pls give me yhe script for the perks i mean a script what will change the perks in your menu on what you are playing tnx
yeah that one
Here you go:
Give all Perks dynamically:
func_GiveAllPerks()

Remove all Perks dynamically:
func_RemoveAllPerks()
Code:
//----------------------------------------
// Include this:

#include maps/mp/zombies/_zm_utility;
#include maps/mp/zombies/_zm_weapons;
#include maps/mp/zombies/_zm;
#include maps/mp/zombies/_zm_perks;

//----------------------------------------


//----------------------------------------
//GiveAllPerk created by NzV and CabCon!
//----------------------------------------

func_GiveAllPerks()
{
    if (isDefined(level.zombiemode_using_juggernaut_perk) && level.zombiemode_using_juggernaut_perk)
         self doGivePerk("specialty_armorvest");
    if (isDefined(level.zombiemode_using_sleightofhand_perk) && level.zombiemode_using_sleightofhand_perk)
      self doGivePerk("specialty_fastreload");
    if (isDefined(level.zombiemode_using_revive_perk) && level.zombiemode_using_revive_perk)
       self doGivePerk("specialty_quickrevive");
    if (isDefined(level.zombiemode_using_doubletap_perk) && level.zombiemode_using_doubletap_perk) 
       self doGivePerk("specialty_rof");
    if (isDefined(level.zombiemode_using_marathon_perk) && level.zombiemode_using_marathon_perk)
        self doGivePerk("specialty_longersprint");
    if(isDefined(level.zombiemode_using_additionalprimaryweapon_perk) && level.zombiemode_using_additionalprimaryweapon_perk)
        self doGivePerk("specialty_additionalprimaryweapon");
    if (isDefined(level.zombiemode_using_deadshot_perk) && level.zombiemode_using_deadshot_perk)
        self doGivePerk("specialty_deadshot");
    if (isDefined(level.zombiemode_using_tombstone_perk) && level.zombiemode_using_tombstone_perk)
        self doGivePerk("specialty_scavenger");
    if (isDefined(level._custom_perks) && isDefined(level._custom_perks["specialty_flakjacket"]) && (level.script != "zm_buried"))
        self doGivePerk("specialty_flakjacket");
    if (isDefined(level._custom_perks) && isDefined(level._custom_perks["specialty_nomotionsensor"]))
        self doGivePerk("specialty_nomotionsensor");
    if (isDefined(level._custom_perks) && isDefined(level._custom_perks["specialty_grenadepulldeath"]))
        self doGivePerk("specialty_grenadepulldeath");
    if (isDefined(level.zombiemode_using_chugabud_perk) && level.zombiemode_using_chugabud_perk)
        self doGivePerk("specialty_finalstand");
    self iprintln("All Perks ^2Gived");
}

doGivePerk(perk)
{
    self endon("disconnect");
    self endon("death");
    level endon("game_ended");
    self endon("perk_abort_drinking");
    if (!(self hasperk(perk) || (self maps/mp/zombies/_zm_perks::has_perk_paused(perk))))
    {
        gun = self maps/mp/zombies/_zm_perks::perk_give_bottle_begin(perk);
        evt = self waittill_any_return("fake_death", "death", "player_downed", "weapon_change_complete");
        if (evt == "weapon_change_complete")
            self thread maps/mp/zombies/_zm_perks::wait_give_perk(perk, 1);
        self maps/mp/zombies/_zm_perks::perk_give_bottle_end(gun, perk);
        if (self maps/mp/zombies/_zm_laststand::player_is_in_laststand() || isDefined(self.intermission) && self.intermission)
            return;
        self notify("burp");
    }
}

func_RemoveAllPerks()
{
    self notify("specialty_armorvest_stop");
    self notify("specialty_fastreload_stop");
    self notify("specialty_quickrevive_stop");
    self notify("specialty_rof_stop");
    self notify("specialty_longersprint_stop");
    self notify("specialty_additionalprimaryweapon_stop");
    self notify("specialty_deadshot_stop");
    self notify("specialty_scavenger_stop");
    self notify("specialty_flakjacket_stop");
    self notify("specialty_nomotionsensor_stop");
    self notify("specialty_grenadepulldeath_stop");
    self notify("specialty_finalstand_stop");
    self iprintln("All Perks ^1Removed");
}

Question answered.
 
Top