Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- custom_perk_1()
- {
- count = 0;
- self.count_exceeded = false;
- self.increase_count = false;
- self thread zombies_array(count);
- self thread increase_count(count);
- }
- zombies_array()
- {
- while(1)
- {
- zombs = getaispeciesarray("axis");
- for(i=0;i<zombs.size;i++)
- {
- zombs[i] thread damage_detection();
- }
- wait 1;
- }
- }
- damage_detection()
- {
- players = getplayers();
- for(i=0;i<players.size;i++)
- {
- self waittill ("damage");
- if(players[i] IsMeleeing() && players[i].count_exceeded == false)
- {
- //iPrintLnBold("melee detected");
- players[i].increase_count = true;
- players[i] thread reset_timer();
- self thread maps\_zombiemode_spawner::zombie_head_gib();
- self DoDamage( self.health * 100, self.origin );
- }
- }
- }
- increase_count(count)
- {
- while(1)
- {
- if(self.increase_count == true)
- {
- if ( count >= 4 )
- {
- //iPrintLnBold("count > 4");
- self.increase_count = false;
- self.count_exceeded = true;
- self notify ("begin_countdown");
- self thread reset_count(count);
- self waittill ("timer_up");
- //iPrintLnBold("reset");
- count = 0;
- self.count_exceeded = false;
- }
- else
- {
- //iPrintLnBold("count < 4");
- self.increase_count = false;
- count++;
- self maps\_zombiemode_score::player_add_points( "death", "MOD_MELEE", "head" );
- }
- }
- wait .5;
- }
- }
- reset_timer()
- {
- level endon ("between_round_over");
- while(1)
- {
- self waittill ("begin_countdown");
- //iPrintLnBold("timer begin");
- wait 30;
- self notify ("timer_up");
- }
- }
- reset_count()
- {
- level waittill ("between_round_over");
- self notify ("timer_up");
- }
- hud_color(hud)
- {
- while(1)
- {
- if(self.count_exceeded == false)
- {
- hud.color = ( 1, 1, 0 );
- }
- else
- {
- hud.color = ( 1, 1, 1 );
- }
- wait .5;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement