
team.SetUp( 1, "Citizens", Color( 0, 120, 0, 255 ) );
team.SetUp( 2, "Civil Protection", Color( 102, 127, 255, 255 ) );
team.SetUp( 3, "OverWatch", Color( 68, 98, 174, 255 ) );
team.SetUp( 4, "OverWatch Elite", Color( 255, 217, 48, 255 ) );
team.SetUp( 5, "City Administrators", Color( 255, 0, 0, 255 ) );
team.SetUp( 6, "Combine Command", Color( 100, 100, 100, 255 ) );

TS = { }

TS.ItemsData = { }

TS.MapViews = { }
TS.MapViews["gm_construct"] = { 

	ang = Angle( 20.314821243286, 47.419368743896, 0 ),
	pos = Vector( -1063.2745361328, -1709.8194580078, 610.81103515625 ),

}
TS.MapViews["rp_c18_v1"] = {
 
	pos = Vector( -756.96539306641, -251.11378479004, 1040.7036132813 ),							
	ang = Angle( -11.148345947266, -16.038745880127, 0 ), 
	
}							 
TS.MapViews["rp_tb_city45_v02n"] = {
	
	pos = Vector( 259.531250, 3688.125000, 777.312500 ),
	ang = Angle( 21.999979, -120.679893, 0 ), 
}							 
TS.MapViews["rp_central17_v3_dsrp"] = { 

	pos = Vector( -3818.437500, -1343.500000, 624.500000 ),
	Ang = Angle( 44.509331, 89.896324, 0.000000 ), 

}
					
TS.MapNames = { }

TS.MapNames["rp_c18_v1"] = "City 18";
TS.MapNames["rp_central17_v3_dsrp"] = "Central 17";


TS.MaxInventories = 5;

TS.HUDItemInfo = { }
   
TS.SelectablePlayerModels =
{
     "models/humans/group01/male_01.mdl",
	"models/humans/group01/male_02.mdl",
	"models/humans/group01/male_03.mdl",
	"models/humans/group01/male_04.mdl",
	"models/humans/group01/male_05.mdl",
	"models/humans/group01/male_06.mdl",
	"models/humans/group01/male_07.mdl",
	"models/humans/group01/male_08.mdl",
	"models/humans/group01/male_09.mdl",
	"models/humans/group01/female_01.mdl",
	"models/humans/group01/female_02.mdl",
	"models/humans/group01/female_03.mdl",
	"models/humans/group01/female_04.mdl",
	"models/humans/group01/female_05.mdl",
	"models/humans/group01/female_06.mdl",
}

-- IMPORTANT LOL --

TS.PlayerStats = 
{

	"Strength", 
	"Speed",
	"Endurance",
	"Aim"

}

for k, v in pairs( TS.PlayerStats ) do

	CreatePlayerVariable( v, "Short", 10 );
	CreatePlayerVariable( v .. "Progress", "Short", 10 );
	
end

CreatePlayerVariable( "Rubles", "Short", 3 );
CreatePlayerVariable( "CID", "Short", 0 )
CreatePlayerVariable( "Age", "Short", 0 );
CreatePlayerVariable( "Sprint", "Short", 100 );
CreatePlayerVariable( "Holstered", "Bool", true );
CreatePlayerVariable( "Consciousness", "Short", 100 );
CreatePlayerVariable( "DrunkMul", "Float", 0 );
CreatePlayerVariable( "Title", "String", "" );
CreatePlayerVariable( "SecondTitle", "String", "" );
CreatePlayerVariable( "Bleeding", "Bool", false );
CreatePlayerVariable( "FreezeHead", "Bool", false );
CreatePlayerVariable( "CanSprint", "Bool", true );
CreatePlayerVariable( "Conscious", "Bool", true );
CreatePlayerVariable( "Flags", "String", " ");
CreatePlayerVariable( "FactionFlags", "String", " ");
CreatePlayerVariable( "RadioFreq", "Short", -1 );
CreatePlayerVariable( "PrimaryWeapon", "String", "" );
CreatePlayerVariable( "SecondaryWeapon", "String", "" );

--Get elapsed time in hours, minutes, and seconds
function GetHMS()

	local s = CurTime(); --How many total seconds do we have
	local totalm = math.floor( s / 60 ); --How many total minutes do we have
	local h = math.floor( totalm / 60 ); --How many total hours do we have
	
	local m = totalm - h * 60; --Minutes left
	s = s - totalm * 60; --Seconds left
	
	return h, m, math.floor( s );

end

function FormatLine( str, font, size )

	local start = 1;
	local c = 1;
	
	surface.SetFont( font );
	
	local endstr = "";
	local n = 0;
	local lastspace = 0;
	
	while( string.len( str ) > c ) do
	
		local sub = string.sub( str, start, c );
	
		if( string.sub( str, c, c ) == " " ) then
			lastspace = c;
		end

		if( surface.GetTextSize( sub ) >= size ) then
			
			local sub2;
			
			if( lastspace == 0 ) then
				lastspace = c;
			end
			
			if( lastspace > 1 ) then
				sub2 = string.sub( str, start, lastspace - 1 );
				c = lastspace;
			else
				sub2 = string.sub( str, start, c );
			end
			
			endstr = endstr .. sub2 .. "\n";
			
			
			start = c + 1;
			n = n + 1;
		
		end
	
		c = c + 1;
	
	end
	
	if( start < string.len( str ) ) then
	
		endstr = endstr .. string.sub( str, start );
	
	end
	
	return endstr, n;

end
--[[
function FormatLine( str, font, size )

	local tbl = string.Explode( " ", str );
	
	surface.SetFont( font );
	
	local x = 0;
	local linewidth = 0;
	local spacewidth = surface.GetTextSize( " " );
	
	local endstr = "";
	local n = 0;
		
	for n = 1, #tbl do
	
		local sub = tbl[n];
		local width = surface.GetTextSize( tbl[n] );
		
		if( string.find( sub, "\n" ) then
		
			endstr = endstr .. sub;
			linewidth = 0;
			n = n + 1;
		
		elseif( width > size ) then
		
			endstr = endstr .. sub .. "\n";
			linewidth = 0;
			n = n + 1;
			
		elseif( width + spacewidth + linewidth > size ) then
		
			endstr = endstr .. "\n" .. sub .. " ";
			linewidth = 0;
			n = n + 1;
			
		else
		
			endstr = endstr .. sub .. " ";
			linewidth = width + linewidth;
		
		end
	
	end
	
	return endstr, n;

end
]]--

--Copy pasta code from garry's mod wiki BECAUSE I JUST DON'T GIVE A FUCK.
 function GetMap()
   local worldspawn = ents.GetByIndex(0)
   local mapname = worldspawn:GetModel()
  
   mapname = string.gsub(mapname,"(%w*/)","")
   mapname = string.gsub(mapname,".bsp","")
   
   return mapname
 end 

-- set max chars allowed.
MAX_CHARACTERS = 8;

--[[function PropDamage( ent1, ent2 )

	return ( not ent1:GetClass()=="prop_physics" && not ent2:IsPlayer() )
end
hook.Add( "PlayerShouldTakeDamage", "PropDamage", PropDamage)
]]--
