function APILoadout.GiveLoadout(m,U)APIEquipment.RemoveWeapons(m)local q=APILoadout.GetLoadoutFromName(U)local n=q.PrimaryEquipment local s=q.SecondaryEquipment local Q=q.TertiaryEquipment APIEquipment.GiveWeapon(m,n,true)APIEquipment.GiveWeapon(m,s,false)APIEquipment.GiveWeapon(m,Q,false)end return APILoadout
-- Context Server
-- Gives a loadout to a player based on the loadout name
-- @param Player player
-- @param String loadoutName
function APILoadout.GiveLoadout(player, loadoutName)
	-- Remove all weapons from the player
	APIEquipment.RemoveWeapons(player)

	local loadoutData = APILoadout.GetLoadoutFromName(loadoutName)

	local primaryName = loadoutData.PrimaryEquipment
	local secondaryName = loadoutData.SecondaryEquipment
	local tertiaryName = loadoutData.TertiaryEquipment

	-- Give the equipment to the player
	APIEquipment.GiveWeapon(player, primaryName, true)
	APIEquipment.GiveWeapon(player, secondaryName, false)
	APIEquipment.GiveWeapon(player, tertiaryName, false)
end

return APILoadout
