Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. timer and count zombie bo2 t6

timer and count zombie bo2 t6

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
2 Posts 2 Posters 635 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • IDiaxeundefined Offline
    IDiaxeundefined Offline
    IDiaxe
    wrote on last edited by
    #1

    time_count_zb.png
    windows + R = %localappdata%\Plutonium\storage\t6\raw\scripts\zm

    crée un fichier exemple = Timer_Count.csg et ajoute le code

    #include maps\mp_utility;
    #include common_scripts\utility;
    #include maps\mp\gametypes_zm_hud_util;
    #include maps\mp\gametypes_zm_hud_message;
    #include maps\mp\zombies_zm_utility;

    init()
    {
    level thread onPlayerConnect();
    }

    onPlayerConnect()
    {
    for (;;)
    {
    level waittill("connecting", player);
    player thread onplayerspawned();
    }
    }

    onplayerspawned()
    {
    self endon("disconnect");
    self thread zombie_counter();
    self thread game_timer();
    self thread round_timer();
    for (;;)
    {
    self waittill("spawned_player");
    }
    }

    game_timer()
    {
    self endon("disconnect");
    wait 2;

    hud = create_simple_hud(self);
    hud.foreground = true;
    hud.sort = 1;
    hud.hidewheninmenu = true;
    hud.alignX = "left";
    hud.alignY = "top";
    hud.horzAlign = "user_left";
    hud.vertAlign = "user_top";
    hud.x = 5;  
    hud.y = 5;  
    hud.alpha = 1;
    hud.label = &"^2Game: ";
    
    hud setTimerUp(0);
    

    }

    round_timer()
    {
    self endon("disconnect");
    wait 2;

    timerHud = create_simple_hud(self);
    timerHud.foreground = true;
    timerHud.sort = 1;
    timerHud.hidewheninmenu = true;
    timerHud.alignX = "left"; 
    timerHud.alignY = "top";
    timerHud.horzAlign = "user_left";
    timerHud.vertAlign = "user_top";
    timerHud.x = 5;
    timerHud.y = 15;  
    timerHud.color = (1, 0, 0);
    timerHud.alpha = 1;
    timerHud.label = &"^2Round: ";
    
    for (;;)
    {
    	timerHud setTimerUp(0);
    	start_time = GetTime() / 1000;
    	level waittill("end_of_round");
    
    	end_time = GetTime() / 1000;
    	time_elapsed = end_time - start_time;
    
    	timerHud setTimer(time_elapsed);
    }
    

    }

    zombie_counter()
    {
    self endon("disconnect");
    flag_wait("initial_blackscreen_passed");

    // Utilisation de create_simple_hud() pour uniformiser la police
    self.zombiecounter = create_simple_hud(self);
    self.zombiecounter.foreground = true;
    self.zombiecounter.sort = 1;
    self.zombiecounter.hidewheninmenu = true;
    self.zombiecounter.alignX = "left";
    self.zombiecounter.alignY = "top";
    self.zombiecounter.horzAlign = "user_left";
    self.zombiecounter.vertAlign = "user_top";
    self.zombiecounter.x = 5;
    self.zombiecounter.y = 25; 
    self.zombiecounter.alpha = 1;
    self.zombiecounter.label = &"^2Zomb: ";
    
    for (;;)
    {
    	self.zombiecounter setvalue(level.zombie_total + get_current_zombie_count());
    	wait 0.05;
    }
    

    }

    1 Reply Last reply
    1
    • briskoLEGOATundefined Offline
      briskoLEGOATundefined Offline
      briskoLEGOAT
      wrote last edited by
      #2

      could you explain to me how can i use it without the zombie counter ?

      1 Reply Last reply
      0

      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Donate