PLUGIN.Name = "SSTRP Templates"; -- What is the pugin name
PLUGIN.Author = "Wolly"; -- Author of the plugin
PLUGIN.Description = "Tad Outdated, Still works, however."; -- The description or purpose of the plugin

function PLUGIN.Init( )

	ConVars[ "HL2ExtraHealth" ] = 25; -- How much extra health do SST get?
	ConVars[ "HL2ExtraArmor" ] = 100; -- How much extra armor do SST get?
	ConVars[ "HL2ExtraSpeed" ] = 1.05; -- How much extra speed do SST get?
	
	
end


function HL2Booster(ply) -- Fukken boosted :o

	ply:SetHealth(ply:MaxHealth() + ConVars[ "HL2ExtraHealth" ]);
	ply:SetArmor(ply:MaxArmor() + ConVars[ "HL2ExtraArmor" ]);
	GAMEMODE:SetPlayerSpeed( ply, ply:MaxWalkSpeed() * ConVars[ "HL2ExtraSpeed" ], ply:MaxRunSpeed() * ConVars[ "HL2ExtraSpeed" ] );
	
	ply:ChangeMaxHealth(ConVars[ "HL2ExtraHealth" ]);
	ply:ChangeMaxArmor(ConVars[ "HL2ExtraArmor" ]);
	ply:ChangeMaxWalkSpeed(ply:MaxWalkSpeed() * ConVars[ "HL2ExtraSpeed" ] - ply:MaxWalkSpeed());
	ply:ChangeMaxRunSpeed(ply:MaxRunSpeed() * ConVars[ "HL2ExtraSpeed" ] - ply:MaxRunSpeed());
	
end

function HL2Team( name, color, flag, weapons, model, business ) -- Without parameters, this will spit out your every day average Civil Protection team.

	local team = TeamObject( );
	
	team.name = name or "HL2";
	team.color = color or Color( 255, 0, 0, 255 ); -- Blue, they just LOVE blue.
	team.flag_key = flag or "HL2";
	team.default_model = true; -- It's not a citizen, after all.
	team.model_path = model or "models/humans/group03/";
	team.weapons = weapons or { "federation_smg" }; -- HL2ify your weapons table or they'll end up with a pistol! D:
	team.door_groups = { 1 };
	team.radio_groups = { 2 };
	team.sound_groups = { 1 };
	team.public = false;
	team.item_groups = { 1 };
	team.business = business or true;
	team.broadcast = true;
	team.salary = 4000;
	
	AddTeamHook( "PlayerSpawn", team.flag_key .. "_HL2booster", HL2Booster, flag or "not a flag"); -- Hook into this team's PlayerSpawn so we can boost them
	
	return team;
	
end

function CitizenTeam( name, color, flag, business, public, items ) -- Without parameters, this will spit out a shop owner team. ( The primary citizen team is hardcoded in teams.lua )

	local team = TeamObject( );
	
	team.name = name or "Survivor";
	team.color = color or Color( 0, 255, 0, 255 ); -- Green is a neutral color, I suppose.
	team.flag_key = flag or "citizen";
	team.business = business or true;
	team.public = public or true; -- I'd think you would want a citizen team to be public, am I right?
	team.business = false;
	team.weapons = {};
	team.soundgroups = { 2 }; -- Human voices
	team.item_groups = items or {  };
	
	
	return team;
	
end
