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

Plutonium

_pro7undefined

_pro7

@_pro7
About
Posts
15
Topics
3
Shares
0
Groups
0
Followers
5
Following
12

Posts

Recent Best Controversial

  • I wanted to add a timer to know how long it took the player to take the round
    _pro7undefined _pro7
    high_round_tracker()
    {
    	// marca que está rodando (debug opcional)
    	// iprintlnbold("^2HighRound Tracker ON");
    
    	// thread que informa recordes periodicamente
    	thread high_round_info_giver();
    
    	// Descobre mapa/modo
    	gamemode = gamemodeName(getDvar("ui_gametype"));
    	map = mapName(level.script);
    	if (level.script == "zm_transit" && getDvar("ui_gametype") == "zsurvival")
    	{
    		map = startLocationName(getDvar("ui_zm_mapstartlocation"));
    	}
    
    	// Garante pasta de logs
    	if (!directoryExists("logs"))
    	{
    		createDirectory("logs");
    	}
    
    	filename = "logs/" + map + gamemode + "HighRound.txt";
    
    	// Inicializa arquivo se não existir
    	if (!fileExists(filename))
    	{
    		writeFile(filename, "0;-", false); // false = sobrescreve
    	}
    
    	// Carrega estado
    	text = readFile(filename);
    	if (!isDefined(text) || text == "")
    	{
    		text = "0;-";
    	}
    
    	info = strTok(text, ";");
    	level.HighRound = int(info[0]);
    	level.HighRoundPlayers = isDefined(info[1]) ? info[1] : "-";
    
    	// Espera fim da partida para checar recorde
    	for (;;)
    	{
    		level waittill("end_game");
    
    		if (level.round_number > level.HighRound)
    		{
    			// monta lista de jogadores
    			level.HighRoundPlayers = "";
    			players = get_players();
    			for (i = 0; i < players.size; i++)
    			{
    				if (level.HighRoundPlayers == "")
    					level.HighRoundPlayers = players[i].name;
    				else
    					level.HighRoundPlayers = level.HighRoundPlayers + "," + players[i].name;
    			}
    
    			// feedback
    			foreach (player in level.players)
    			{
    				player tell("Record: ^1" + level.round_number);
    				player tell("Por: ^1" + level.HighRoundPlayers);
    			}
    
    			// persiste no disco e atualiza variáveis
    			log_highround_record(level.round_number + ";" + level.HighRoundPlayers);
    		}
    	}
    }
    
    log_highround_record(newRecord)
    {
    	gamemode = gamemodeName(getDvar("ui_gametype"));
    	map = mapName(level.script);
    	if (level.script == "zm_transit" && getDvar("ui_gametype") == "zsurvival")
    	{
    		map = startLocationName(getDvar("ui_zm_mapstartlocation"));
    	}
    
    	filename = "logs/" + map + gamemode + "HighRound.txt";
    	writeFile(filename, newRecord, false); // sobrescreve com o novo recorde
    
    	// Atualiza na memória
    	info = strTok(newRecord, ";");
    	level.HighRound = int(info[0]);
    	level.HighRoundPlayers = isDefined(info[1]) ? info[1] : "-";
    }
    
    BO2 Modding Support & Discussion

  • [Release] [ZM] [Mod] zm_perks - Adding all perks to maps
    _pro7undefined _pro7

    sehteria a good surprise is coming

    BO2 Modding Releases & Resources

  • [Release] [ZM] [Mod] zm_expanded - Combining zm_weapons & zm_perks into 1 mod
    _pro7undefined _pro7

    Omg 😶 This is Very insane bro.

    BO2 Modding Releases & Resources

  • [Resource] Sliquifier for Zombies (with PaP)
    _pro7undefined _pro7

    made in brazil hehehe

    BO2 Modding Releases & Resources
  • 1 / 1
  • Login

  • Don't have an account? Register

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