mirror of
https://github.com/JezuzLizard/Public-BO2-Mods.git
synced 2025-06-07 10:47:49 -05:00
Create grieffix_official.gsc
This commit is contained in:
parent
5072e8cb2c
commit
b4016ab7eb
55
GriefFix/grieffix_official.gsc
Normal file
55
GriefFix/grieffix_official.gsc
Normal file
@ -0,0 +1,55 @@
|
||||
#include maps\mp\_utility;
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\zombies\_zm_utility;
|
||||
#include maps\mp\gametypes_zm\_hud_util;
|
||||
#include maps\mp\gametypes_zm\_hud_message;
|
||||
#include maps\mp\zombies\_zm;
|
||||
|
||||
init()
|
||||
{
|
||||
if ( getDvar( "g_gametype" ) == "zgrief" )
|
||||
{
|
||||
level thread on_player_connect();
|
||||
if ( getDvarInt( "zombies_minplayers" ) < 2 || getDvarInt( "zombies_minplayers" ) == "" )
|
||||
{
|
||||
setDvar( "zombies_minplayers", 2 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
on_player_connect()
|
||||
{
|
||||
while ( 1 )
|
||||
{
|
||||
level waittill( "connected", player );
|
||||
player set_team();
|
||||
player [[ level.givecustomcharacters ]]();
|
||||
}
|
||||
}
|
||||
|
||||
set_team()
|
||||
{
|
||||
teamplayersallies = countplayers( "allies");
|
||||
teamplayersaxis = countplayers( "axis");
|
||||
if ( teamplayersallies > teamplayersaxis && !level.isresetting_grief )
|
||||
{
|
||||
self.team = "axis";
|
||||
self.sessionteam = "axis";
|
||||
self.pers[ "team" ] = "axis";
|
||||
self._encounters_team = "A";
|
||||
}
|
||||
else if ( teamplayersallies < teamplayersaxis && !level.isresetting_grief)
|
||||
{
|
||||
self.team = "allies";
|
||||
self.sessionteam = "allies";
|
||||
self.pers[ "team" ] = "allies";
|
||||
self._encounters_team = "B";
|
||||
}
|
||||
else
|
||||
{
|
||||
self.team = "allies";
|
||||
self.sessionteam = "allies";
|
||||
self.pers[ "team" ] = "allies";
|
||||
self._encounters_team = "B";
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user