I do I will answer about it later.Can someone please help me with the script for the perma perks. thank you for your time and consideration.
With these two function you can give/take perma perks:Can someone please help me with the script for the perma perks. thank you for your time and consideration.
//perma perks
PermaPerkGive(name)
{
self endon("disconnect");
level endon("game_ended");
self endon("death");
self endon("StopPermaPerks_" + name);
pers_upgrade = level.pers_upgrades[ name ];
for ( ;; )
{
i = 0;
while ( i < pers_upgrade.stat_names.size )
{
stat_name = pers_upgrade.stat_names[ i ];
stat_value = pers_upgrade.stat_desired_values[ i ];
self maps/mp/zombies/_zm_stats::set_global_stat( stat_name, stat_value );
self.stats_this_frame[ stat_name ] = true;
i++;
wait 0.05;
}
wait 10;
}
}
PermaPerkTake(name)
{
self notify("StopPermaPerks_" + name);
wait 0.05;
pers_upgrade = level.pers_upgrades[ name ];
i = 0;
while ( i < pers_upgrade.stat_names.size )
{
stat_name = pers_upgrade.stat_names[ i ];
stat_value = 0;
self maps/mp/zombies/_zm_stats::set_global_stat( stat_name, stat_value );
self.stats_this_frame[ stat_name ] = true;
i++;
}
}
UpdatePermaPerksMenu()
{
input = [];
input[0] = "permaperk";
input[1] = self;
input[2] = "";
input[3] = "";
self addMenu("perksmenu", "permaperksmenu", "Perma Perks");
for(i = 0; i < (level.pers_upgrades_keys.size); i++)
{
input[3] = level.pers_upgrades_keys[i];
self addOption("permaperksmenu", input[3], ::PermaPerkGive, input);
}
}
self addMenuPar("perk name", ::PermaPerkGive, "perk name");