1
0
mirror of https://github.com/Paintball/BO2-GSC-Releases.git synced 2025-06-07 21:38:02 -05:00

Update _clientids.gsc

This commit is contained in:
Nick // Cahz 2021-03-22 10:56:05 -07:00 committed by GitHub
parent 64bb054776
commit f1cd1a67fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,61 +1,134 @@
high_round_tracker() high_round_tracker()
{ {
level.HighRound = getDvarIntDefault( mapName( level.script ) + "HighRound", 1 ); thread high_round_info_giver();
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" ); gamemode = gamemodeName( getDvar( "ui_gametype" ) );
if ( level.HighRoundPlayers == "" ) map = mapName( level.script );
{ if( level.script == "zm_transit" && getDvar( "ui_gametype" ) == "zsurvival" )
level.HighRoundPlayers = "UnNamed Players"; map = startLocationName( getDvar( "ui_zm_mapstartlocation" ) );
} //file handling//
level.basepath = getDvar("fs_basepath") + "/" + getDvar("fs_basegame") + "/";
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 ( ;; ) for ( ;; )
{ {
level waittill ( "end_game" ); level waittill ( "end_game" );
if ( level.round_number > level.HighRound ) if ( level.round_number > level.HighRound )
{ {
setDvar( mapName( level.script ) + "HighRound", level.round_number ); level.HighRoundPlayers = "";
setDvar( mapName( level.script ) + "Players", "" );
level.HighRound = getDvarIntDefault( mapName( level.script ) + "HighRound", 1 );
players = get_players(); players = get_players();
for ( i = 0; i < players.size; i++ ) for ( i = 0; i < players.size; i++ )
{ {
if ( getDvar( mapName( level.script ) + "Players" ) == "" ) if( level.HighRoundPlayers == "" )
{ {
setDvar( mapName( level.script ) + "Players", players[i].name ); level.HighRoundPlayers = players[i].name;
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" );
} }
else else
{ {
setDvar( mapName( level.script ) + "Players", level.HighRoundPlayers + ", " + players[i].name ); level.HighRoundPlayers = level.HighRoundPlayers + "," + players[i].name;
level.HighRoundPlayers = getDvar( mapName( level.script ) + "Players" );
} }
} }
iprintln ( "New Record: ^1" + level.HighRound ); foreach( player in level.players )
iprintln ( "Set by: ^1" + level.HighRoundPlayers ); {
logprint( "Map: " + mapName( level.script ) + " Record: " + level.HighRound + " Set by: " + level.HighRoundPlayers ); player tell( "New Record: ^1" + level.round_number );
player tell( "Set by: ^1" + level.HighRoundPlayers );
}
log_highround_record( level.round_number + ";" + level.HighRoundPlayers );
} }
} }
} }
mapName( name ) log_highround_record( newRecord )
{ {
if( name == "zm_highrise" ) gamemode = gamemodeName( getDvar( "ui_gametype" ) );
return "DieRise"; map = mapName( level.script );
else if( name == "zm_buried" ) if( level.script == "zm_transit" && getDvar( "ui_gametype" ) == "zsurvival" )
return "Buried"; map = startLocationName( getDvar( "ui_zm_mapstartlocation" ) );
else if( name == "zm_prison" ) level.basepath = getDvar("fs_basepath") + "/" + getDvar("fs_basegame") + "/";
return "Motd"; path = level.basepath + "/logs/" + map + gamemode + "HighRound.txt";
else if( name == "zm_tomb" ) file = fopen( path, "w" );
return "Origins"; fputs( newRecord, file );
else if( name == "zm_nuked" ) fclose( file );
return "Nuketown"; }
else if( name == "zm_transit" && level.scr_zm_map_start_location == "transit" )
return "Transit"; startLocationName( location )
else if( name == "zm_transit" && level.scr_zm_map_start_location == "town" ) {
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"; 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() high_round_info()
{ {
wait 5; wait 6;
self iprintln ( "Highest Round for this Map: ^1" + level.HighRound ); self tell( "High Round Record for this map: ^1" + level.HighRound );
self iprintln ( "Record set by: ^1" + level.HighRoundPlayers ); self tell( "Record set by: ^1" + level.HighRoundPlayers );
} }