looks allot like mine
btw need this plugin
put This into <bo2 folder>\t6r\data\plugins
#include maps/mp/zombies/_zm;
#include maps/mp/zombies/_zm_ai_dogs;
#include maps/mp/zombies/_zm_stats;
#include common_scripts/utility;
#include maps/mp/gametypes_zm/_hud_util;
#include maps/mp/_utility;
#include maps/mp/gametypes_zm/_globallogic;
#include maps/mp/zombies/_zm_weapons;
#include maps/mp/zombies/_zm_utility;
#include maps/mp/gametypes_zm/_hud_message;
#include maps/mp/gametypes_zm/_globallogic_score;
#include maps/mp/gametypes_zm/_globallogic_utils;
#include maps/mp/gametypes_zm/_globallogic_defaults;
#include maps/mp/gametypes_zm/_globallogic_spawn;
#include maps/mp/zombies/_zm_perks;
#include maps/mp/zm_tomb_utility;
#include maps/mp/zombies/_zm_challenges;
#include maps/mp/zombies/_zm_laststand;
#include maps/mp/zm_tomb_ee_main;
#include maps/mp/zombies/_zm_sidequests;
#include maps/mp/gametypes_zm/_weapons;
#include maps/mp/zm_tomb_ee_main_step_1;
#include maps/mp/_challenges;
init()
{
thread high_round_tracker();
}
get_map_name()
{
if (!isDefined(level.levelname))
{
if (level.script == "zm_transit" && level.scr_zm_map_start_location == "transit")
{
level.levelname = "Tranzit";
}
else if (level.script == "zm_transit" && level.scr_zm_map_start_location == "town")
{
level.levelname = "Town";
}
else if (level.script == "zm_transit" && level.scr_zm_map_start_location == "farm")
{
level.levelname = "Farm";
}
else if (level.script == "zm_nuked")
{
level.levelname = "Nuketown";
}
else if (level.script == "zm_highrise")
{
level.levelname = "Die Rise";
}
else if (level.script == "zm_prison")
{
level.levelname = "Mob of the Dead";
}
else if (level.script == "zm_buried")
{
level.levelname = "Buried";
}
else if (level.script == "zm_tomb")
{
level.levelname = "Origins";
}
else level.levelname = "Unknown Map";
}
return level.levelname;
}
high_round_tracker()
{
level endon( "end_game" );
level.basepath = getDvar("fs_basepath") + "/" + getDvar("fs_basegame");
path3 = level.basepath + get_map_name() + "_" + "Leaderboard2.txt";
//file3 = fopen(path3, "a+");
etok="-";
if(fileExists(path3))
level.theLBstr = readfile(path3);
else
{
level.HighRoundPlayers = "^5initialized";
writestr = "THRS,3,starting from scratch-\n";
writefile(path3,writestr,1);
level.theLBstr = readfile(path3);
}
level.HighRound = getDvarIntDefault( mapName( level.script ) + "HighRound", 3 );
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" );
level.theLB = strtok(level.theLBstr, etok);
foreach ( lbline in level.theLB )
{
getlbs = strtok(lbline, ",");
if(getlbs[0] == "THRS" && level.HighRound <= getlbs[1] )
{
setDvar( mapName( level.script ) + "HighRound", getlbs[1] );
setDvar( mapName( level.script ) + "Players", "" );
for (i=2;i<=getlbs.size;i++)
{
if ( getDvar( mapName( level.script ) + "Players" ) == "" )
{
setDvar( mapName( level.script ) + "Players", getlbs[i] );
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" );
}
else
{
setDvar( mapName( level.script ) + "Players", level.HighRoundPlayers + ", " + getlbs[i] );
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" );
}
}
}
else if(getlbs[0] == "THRS" && level.HighRound > getlbs[1] )
{
//fclose(file3);
fremove(path3);
//file3 = fopen(path3, "a+");
writestr = ("THRS," + level.HighRound + "," + level.HighRoundPlayers + etok);
writefile(path3,writestr,1);
}
else if(getlbs[0] != "THRS" && level.HighRoundPlayers != "" )
{
//fclose(file3);
fremove(path3);
//file3 = fopen(path3, "a+");
writestr = ("THRS," + level.HighRound + "," + level.HighRoundPlayers + etok);
writefile(path3,writestr,1);
}
else
{
level.HighRoundPlayers = "^5initialized";
setDvar( mapName( level.script ) + "Players", level.HighRoundPlayers );
writestr = ("THRS," + level.HighRound + "," + level.HighRoundPlayers + etok);
writefile(path3,writestr,1);
}
}
level.HighRound = getDvarIntDefault( mapName( level.script ) + "HighRound", 3 );
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" );
if ( level.HighRoundPlayers == "" )
{
level.HighRoundPlayers = "^5initialized";
writestr = ("THRS,3,starting from scratch" + etok);
writefile(path3,writestr,1);
}
//fclose(file3);
istr="";
for(i=0;i<40;i+=4)
istr+=i + " ";
for(i=40;i<100;i+=3)
istr+=i + " ";
fourfactor=strtok(istr," ");
for ( ;; )
{
level waittill ( "end_of_round" );
players = getplayers();
foreach (player in players)
player thread Ping_kick_check(player);
foreach (ff in fourfactor)
{
if (int(ff) == level.round_number)
level thread high_round_info();
}
if( level.round_number == level.HighRound )
{
players = getplayers();
foreach (player in players)
player tell("^5you are about to over throw the ^7high round record ^5if you can pass this round. ^3Good Luck");
}
if ( level.round_number > level.HighRound )
{
setDvar( mapName( level.script ) + "HighRound", level.round_number );
setDvar( mapName( level.script ) + "Players", "" );
level.HighRound = getDvarIntDefault( mapName( level.script ) + "HighRound", 3 );
players = get_players();
for ( i = 0; i < players.size; i++ )
{
if ( getDvar( mapName( level.script ) + "Players" ) == "" )
{
setDvar( mapName( level.script ) + "Players", players[i].name );
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" );
}
else
{
setDvar( mapName( level.script ) + "Players", level.HighRoundPlayers + ", " + players[i].name );
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" );
}
}
iprintln ( "New Record: ^1" + level.HighRound );
iprintln ( "Set by: ^1" + level.HighRoundPlayers );
newLBstr="";
//logprint( "Map: " + mapName( level.script ) + " Record: " + level.HighRound + " Set by: " + level.HighRoundPlayers );
path1 = level.basepath + get_map_name() + "_" + "Leaderboard2.txt";
writestr = ("THRS," + level.HighRound + "," + level.HighRoundPlayers + etok);
//file1 = fopen(path1, "a+");
level.theLBstr = readfile(path1);
level.theLB = strtok(level.theLBstr,etok);
foreach ( lbline in level.theLB )
{
getlbs = strtok(lbline,",");
if(getlbs[0] == "THRS")
newLBstr = writestr;
else
newLBstr +=lbline + etok;
}
//fclose(file1);
fremove(path1);
//file1 = fopen(path1, "a+");
writefile(path1,newLBstr,1);
//fclose(file1);
}
}
}
mapName( name )
{
if( name == "zm_highrise" )
return "Die Rise";
else if( name == "zm_buried" )
return "Buried";
else if( name == "zm_prison" )
return "Mob of the Dead";
else if( name == "zm_tomb" )
return "Origins";
else if( name == "zm_nuked" )
return "Nuketown";
else if( name == "zm_transit" && level.scr_zm_map_start_location == "transit" )
return "Tranzit";
else if( name == "zm_transit" && level.scr_zm_map_start_location == "town" )
return "Town";
else if( name == "zm_transit" && level.scr_zm_map_start_location == "farm" )
return "Farm";
}
high_round_info()
{
wait 10;
AllClientsPrint( "Highest Round for this Map: ^1" + level.HighRound );
AllClientsPrint( "Record set by: ^1" + level.HighRoundPlayers );
}
Ping_kick_check(player)
{
wait randomint( 20 );
}
list_records( player )
{
maps=[];
maps[0] = "Die Rise";
maps[maps.size] = "Buried";
maps[maps.size] = "Mob of the Dead";
maps[maps.size] = "Origins";
maps[maps.size] = "Nuketown";
maps[maps.size] = "Tranzit";
maps[maps.size] = "Town";
maps[maps.size] = "Farm";
recs=[];
level.basepath = getDvar("fs_basepath") + "/" + getDvar("fs_basegame");
for(i=0;i<maps.size;i++)
{
path = level.basepath + maps[i] + "_" + "Leaderboard.txt";
//file = fopen(path, "a+");
etok="-";
thisread = "";
thisread = readfile(path);
if ( thisread == "" )
{
thisread = "THRS,5,MrMrE-";
writefile(path,"THRS,5,MrMrE-",1);
CONTINUE;
}
thisreadarray = strtok(thisread,etok);
recs[i] = "^3 " + maps[i];
foreach(line in thisreadarray)
{
linearray = strtok(line,",");
if(linearray[0] == "THRS")
{
recs[i] += ": ^1"+linearray[1]+ " ^7by ";
for(j=2;isDefined(linearray[j]);j++)
{
if (j==2)
recs[i] +="^6"+linearray[j] + " ";
else
recs[i] += "^7,^6"+linearray[j] + " ";
}
}
}
//fclose(file);
}
for(i=0;i<recs.size;i++)
{
self iPrintLn( recs[i] );
wait .7;
}
}