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

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [Release] [ZM] Highest Round Tracker (UPDATED 3/13/2020)

[Release] [ZM] Highest Round Tracker (UPDATED 3/13/2020)

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
27 Posts 15 Posters 7.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Ch00chinat0rundefined Ch00chinat0r

    Kalitos Any idea what I have done wrong with your script? I have placed the compiled gsc to .../Plutonium\storage\t6\scripts\zm and when running the server I receive this message. Would realllly love to add this feature to my server!
    **** 5 script error(s):
    **** Unresolved external : "fopen" with 2 parameters in "High scores" at lines 1,1 ****
    **** Unresolved external : "fread" with 1 parameters in "High scores" at line 1 ****
    **** Unresolved external : "fclose" with 1 parameters in "High scores" at lines

    Ch00chinat0rundefined Offline
    Ch00chinat0rundefined Offline
    Ch00chinat0r
    wrote on last edited by
    #21

    Ch00chinat0r Got it to work. Had to scroll through more of the thread. Needed to add t6r folder to my game server folder and add the dll there. Great script! I really couldn't be happier with it!

    1 Reply Last reply
    1
    • Kalitosundefined Kalitos

      I fixed the script loading issue. Working with the latest version of the plugin (1.9.5). The script needs an elapsed game to save the first records, then it will display the information.

      #include maps/mp/gametypes/_hud_message;
      #include maps/mp/gametypes/_globallogic_spawn;
      #include maps/mp/gametypes/_spectating;
      #include maps/mp/_tacticalinsertion;
      #include maps/mp/_challenges;
      #include maps/mp/gametypes/_globallogic;
      #include maps/mp/gametypes/_hud_util;
      #include maps/mp/_utility;
      #include common_scripts/utility;
      #include maps/mp/gametypes/_globallogic_ui;
      #include maps/mp/gametypes/_persistence;
      
      init()
      {
          level thread high_round_tracker();
          level thread onPlayerConnect();
      }
      
      onPlayerConnect()
      {
          for(;;)
          {
              level waittill("connected", player);
              player thread high_round_info();
          }
      }
      
      high_round_tracker()
      {
      	thread high_round_info_giver();
      	gamemode = gamemodeName( getDvar( "ui_gametype" ) );
      	map = mapName( level.script );
      	if( level.script == "zm_transit" && getDvar( "ui_gametype" ) == "zsurvival" )
      		map = startLocationName( getDvar( "ui_zm_mapstartlocation" ) );
      	//file handling//
      	level.basepath = getDvar("fs_homepath") + "/";
      	path = level.basepath + "/logs/" + map + gamemode + "HighRound.txt";
      	file = fopen(path, "r");
      	text = fread(file);
      	fclose(file);
      	//end file handling//
      	highroundinfo = strToK( text, ";" );
      	level.HighRound = int( highroundinfo[ 0 ] );
      	level.HighRoundPlayers = highroundinfo[ 1 ];
      	for ( ;; )
      	{
      		level waittill ( "end_game" );
      		if ( level.round_number > level.HighRound )
      		{
      			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;
      				}
      			}
      			foreach( player in level.players )
      			{
      				player tell( "New Record: ^1" + level.round_number );
      				player tell( "Set by: ^1" + level.HighRoundPlayers );
      			}
      			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" ) );
      	level.basepath = getDvar("fs_homepath") + "/";
      	path = level.basepath + "/logs/" + map + gamemode + "HighRound.txt";
      	file = fopen( path, "w" );
      	fwrite( file, newRecord );
      	fclose( file );
      }
      
      startLocationName( location )
      {
      	if( location == "cornfield" )
      		return "Cornfield";
      	else if( location == "diner" )
      		return "Diner";
      	else if( location == "farm" )
      		return "Farm";
      	else if( location == "power" )
      		return "Power";
      	else if( location == "town" )
      		return "Town";
      	else if( location == "transit" )
      		return "BusDepot";
      	else if( location == "tunnel" )
      		return "Tunnel";
      }
      
      mapName( map )
      {
      	if( map == "zm_buried" )
      		return "Buried";
      	else if( map == "zm_highrise" )
      		return "DieRise";
      	else if( map == "zm_prison" )
      		return "Motd";
      	else if( map == "zm_nuked" )
      		return "Nuketown";
      	else if( map == "zm_tomb" )
      		return "Origins";
      	else if( map == "zm_transit" )
      		return "Tranzit";
      	return "NA";
      }
      
      gamemodeName( gamemode )
      {
      	if( gamemode == "zstandard" )
      		return "Standard";
      	else if( gamemode == "zclassic" )
      		return "Classic";
      	else if( gamemode == "zsurvival" )
      		return "Survival";
      	else if( gamemode == "zgrief" )
      		return "Grief";
      	else if( gamemode == "zcleansed" )
      		return "Turned";
      	return "NA";
      }
      
      high_round_info_giver()
      {
      	highroundinfo = 1;
      	roundmultiplier = 5;
      	level endon( "end_game" );
      	while( 1 )
      	{	
      		level waittill( "start_of_round" );
      		if( level.round_number == ( highroundinfo * roundmultiplier ))
      		{
      			highroundinfo++;
      			foreach( player in level.players )
      			{
      				player tell( "High Round Record for this map: ^1" + level.HighRound );
      				player tell( "Record set by: ^1" + level.HighRoundPlayers );
      			}
      		}
      	}
      }
      
      high_round_info()
      {
      	wait 6;
      	self tell( "High Round Record for this map: ^1" + level.HighRound );
      	self tell( "Record set by: ^1" + level.HighRoundPlayers );
      }
      
      akashioundefined Offline
      akashioundefined Offline
      akashio
      wrote on last edited by
      #22

      Kalitos Hey, I tried using that script sadly as soon the script loads in my server, my server crashes and just reboots.. Do you have any idea how I can fix this issue?

      Kalitosundefined 1 Reply Last reply
      0
      • akashioundefined akashio

        Kalitos Hey, I tried using that script sadly as soon the script loads in my server, my server crashes and just reboots.. Do you have any idea how I can fix this issue?

        Kalitosundefined Offline
        Kalitosundefined Offline
        Kalitos
        wrote on last edited by
        #23

        akashio I don't know, maybe he forgot to load the plugin

        1 Reply Last reply
        0
        • emiloxdundefined Offline
          emiloxdundefined Offline
          emiloxd
          wrote on last edited by
          #24

          Doesn't work for me.
          **** Unresolved external : "fputs" with 2 parameters in "round-tracker" at line 1 ****

          Aranellaundefined 1 Reply Last reply
          0
          • emiloxdundefined emiloxd

            Doesn't work for me.
            **** Unresolved external : "fputs" with 2 parameters in "round-tracker" at line 1 ****

            Aranellaundefined Offline
            Aranellaundefined Offline
            Aranella
            wrote on last edited by
            #25

            emiloxd copy the version kalitos posted a few comments up that's the working one the version cahz put isn't working anymore because not updated in years(?)

            1 Reply Last reply
            0
            • emiloxdundefined Offline
              emiloxdundefined Offline
              emiloxd
              wrote on last edited by
              #26

              I got some errors using that one aswell

              1 Reply Last reply
              0
              • Echostarsundefined Offline
                Echostarsundefined Offline
                Echostars
                wrote on last edited by
                #27

                I'd love to see a full tutorial of how to install this as im very lost on what is going on relating to this post. It's very confusing

                1 Reply Last reply
                1
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • 1
                • 2
                • Login

                • Don't have an account? Register

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